SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

Selenium IDE Tutorial For "storeEditable" And "storeVisible" Command Eith Example

Both "storeEditable" and "storeVisible" commands are useful to store 'True' or 'False' in variable based on current condition of element on page of software web application. You can read "assertEditable" and "assertNotEditable" command post for your better understanding. "storeEditable" command and
"storeVisible" command both are designed for different purpose. Consider bellow given examples for your reference.

"storeVisible" Command
"storeVisible" command is useful to check the visibility of element and will store 'True' in variable if element is visible. Else it will store 'False' in variable. Let we consider simple example as bellow.

New Test
CommandTargetValue
openhttp://www.w3schools.com/css/css_display_visibility.asp
setSpeed500
storeVisiblecss=#imgbox2 > input.boxi
echo${i}
clickcss=#imgbox2 > input.box
storeVisiblecss=#imgbox2 > input.boxi
echo${i}

In above example, First 'storeVisible' command will store 'True' in variable = i because Image 'Box 2' is visible on software web application page on that stage. Second 'storeVisible' command will store 'False' in variable = i because Image 'Box 2' is hided by clicking on it during previous "click" command execution.

"storeEditable" Command
"storeEditable" command is best work with input elements and will check if targeted element is editable or not. If it is editable then will store 'True' in variable else it will store 'False' in variable. Look at bellow example.

New Test
CommandTargetValue
openhttp://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_readonly
storeEditablecss=input[name="email"]i
echo${i}
storeEditablecss=input[name="country"]j
echo${j}

There are 2 text boxes on web page. One with name 'Email' and it is editable. Another with name 'Country' which is not editable. Now run above example. First 'storeEditable' will store 'True' in variable 'i' because that text box is editable. Second 'storeEditable' will store 'False' in variable 'j' because that text box is not editable.

No comments:

Post a Comment