"assertVisible" and "assertNotVisible" Commands frequently used commands in selenium IDE if you are using selenium IDE for your software web application regression testing. Both "assertVisible" and "assertNotVisible" commands are useful to check element visibility on application software page.You can use

"assertNotVisible" command will check element visibility on page and will pass if targeted element is not visible on page. If targed element is present on page then it will return '[error] true' in execution log and selenium will stop execution. Look in to bellow example, "assertNotVisible" will return '[error] true' in execution log because element is already there on page.

New Test

Command

Target

Value

open

http://www.w3schools.com/css/css_display_visibility.asp

assertVisible

css=#imgbox2 > input.box

assertNotVisible

css=#imgbox2 > input.box

"assertVisible" Command

"assertVisible" command will check visibility of element on page and return '[error] false' if element not visible on page. In bellow example, "assertVisible" will return error because now targeted element is hided from page using previous "click" command.