Dashboard > Selenium > ... > Contributed User-Extensions > inputIsEditable
Selenium Log In View a printable version of the current page.
inputIsEditable
Added by Chuck Hill, last edited by Chuck Hill on Feb 14, 2008  (view change)
Labels: 
(None)

Description

This differs from the standard isEditable as isEditable fails with an error if the element specified by the locator is not an input element. This returns false if the element specified by the locator is not an input element. This is useful for pages with an editable an non-editable mode where the editable input and the non-editable string have the same locator (i.e. an id on the input or on a span wrapping the non-editable text).

If an input is specified, determines whether the element specified by the locator is an input element that is editable, ie hasn't been disabled.

See the related Selenium IDE Extension.

Example of Use

<form>
    <span id="UneditableString">Uneditable String</span><br />
    <input id="EditableInput" type="text" name="dummy" value="Editable Value"><br />
    <input id="DisabledInput" type="text" name="dummy" disabled="true"value="Non-editable Value"><br />
</form>
verifyNotEditableInput UneditableString  
verifyEditableInput EditableInput  
verifyNotEditableInput DisabledInput  

License

Public domain

Download

inputIsEditable.zip

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators