This articles describes how you can use the Navigator.CheckObjectExists(...) function to see if a web page exists and how it differs from the Global.DoWaitFor / DoWaitForProperty functions that are described in another article.
Firstly, the Global.DoWaitFor(...) and Global.DoWaitForProperty(...) functions are both generic and can be used for all kinds of applications - web, desktop or mobile. The Navigator.CheckObjectsExists(...) function is part of the Navigator object and therefore can only be used for web application tests.

In addition, the CheckObjectExists function can use either an XPATH/CSS string or a Rapise learned object name, so it gives you the ability to check an arbitrary XPATH/CSS query without the object needing to be learned beforehand, which can sometimes be useful.

Here are some examples of both syntax options (XPATH vs. CSS):

1) Using an Object ID

You can use the same ObjectID that you would use an SeS(...) command:


2) Using explicit XPATH/CSS

You can use an explicit XPATH expression as well:

Article Info
  • Last Updated: 1/7/2016
  • Article ID: KB187
  • Views: 1857