function: assertVisible - egroise/uxtest GitHub Wiki

###Usage

assertVisible(pattern, [delay], [message])
-or-
visible(pattern, [delay], [message])

This assertion is successful is given pattern is visible in the screen.

Both success and failure are reported in the report files.

###Parameters

  • pattern: image pattern or text to search.
  • delay (optional): maximum wait delay in seconds. If no delay is provided, it will not wait at all (pattern expected at call)
  • message (optional): message to be displayed in the reporting files.

###Return

Returns True if test is successful, False other-else.

###Examples

assertVisible("page 1 tab.png",15,"Page 1 tab test")

...will check if the image pattern is visible, waiting up to 15s it's apparition, and will display "Page 1 tab test" in the report.

assertVisible("validation button.png")

...will check if the image pattern is visible without waiting. A generic message will be displayed in the report.