AscentialTest Support Hub

Using selectors to …

 

Notifications

Clear all

Using selectors to dynamically intantiate an object at runtime



1

Posts


1

Users


0

Reactions


59

Views

(@blesuer)
Member Admin

Joined: 4 months ago
Posts: 33

Topic starter
 

Most of us use selectors to locate a row in a table or grid but they also have another purpose. This is an example of using a selector to dynamically instantiate a WebText object.

Boolean bExists = MyPage.WebText[“some text”, exact].IsPresent()

Replace MyPage with your actual AppObject name of your web page and replace “some text” with the actual text of the object that you want to locate. By adding the keyword ‘exact’, AscentialTest will only find a match if the case of the text exactly matches the supplied text.



   

Quote

Share:

Can’t Find An Answer in the Forum?

Contact Our Team