isVisible
isVisible returns true if the element is visible, else false.
This can be used in combination with conditional statements (example shown below) or with Assertions.
The value can also be fetched and stored in a variable and can be used for later purposes in the script.
Example and Usage below:
Another example can be downloaded from here
Javascript example
navigateTo("http://sahitest.com/demo/ ");
click(link("a x"));
var var1=isVisible(link("linkById"));
log(var1);
if (var1==true){
click(link("linkById"));
}
click(link("linkTest.htm"));