Selenium IDE Tutorial For "waitForEditable" And "waitForNotEditable" Commands With Example

Selenium IDE is free, easy and simple record and play regression testing tool and it is very easy to prepare regression testing test cases of any software web application if flow of execution is not much more complex and harder. More complex applications can not be automated in selenium IDE and we need to use
SELENIUM WEBDRIVER. Selenium IDE has different WAITFOR COMMANDS which can help us to handle few complex scenarios. Let me describe you 2 more related commands.

"waitForEditable" Command
"waitForEditable" command is useful to wait till targeted input text box get editable. As soon as targeted element gets editable, selenium IDE will execute next command. This command works with only input fields. Run bellow given example in your selenium IDE window and verify result.

New Test
CommandTargetValue
openhttp://only-testing-blog.blogspot.com/2014/01/textbox.html
highlight//input[@id='text2']
waitForEditable//input[@id='text2']
highlight//input[@id='text2']
type//input[@id='text2']Now i can type here

In above example, "waitForEditable" command will wait for targeted element get editable.

"waitForNotEditable" Command
"waitForNotEditable" functioning in opposite to "waitForEditable" command. It will wait till targeted input element change its state from editable to not editable. Look at bellow given example.

New Test
CommandTargetValue
openhttp://only-testing-blog.blogspot.com/2014/01/textbox.html
highlight//input[@id='text1']
waitForNotEditable//input[@id='text1']
highlight//input[@id='text1']
type//input[@id='text2']Now First Name field is not editable.

In above example, "waitForNotEditable" command will wait for targeted element get not enabled/disabled.

No comments:

Post a Comment