Pages

Search This Blog

Saturday, May 22, 2010

How to test element is editable in selenium

We can verify weather an element is editable or not using isEditable selenium command.

If your element is in below format

<input value="black" name="plain_text">

then we can use selenium isEditable to find this element is editable or not

assertTrue(selenium.isEditable("plain_text"));

<select name="plain_select"><option>Niraj</option></select>

assertTrue(selenium.isEditable("plain_select"));

<input disabled="yup" value="black" name="disabled_text">

assertTrue(!selenium.isEditable("disabled_text"));

<select disabled="yup" name="disabled_select"><option>Niraj</option></select>

assertTrue(!selenium.isEditable("disabled_select"));

5 comments:

  1. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium

    ReplyDelete
  2. How we can verify non-editable elements on web page ?
    I'm using java to verify read only element.Please provide solution

    ReplyDelete
  3. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium.
    Selenium

    ReplyDelete
  4. Well explained. Got to learn new things from your Blog on Appium.
    Appium training in chennai

    ReplyDelete
  5. It was very nice blog to learn about Selenium.Thanks for sharing new things.selenium training in chennai

    ReplyDelete