Use ObjectIdentifier property with QuerySelector
Hello, I am using a desktop version of a web application, and when I use the Object Spy I can recognize different buttons, and dropdowns, etc.
These objects have a unique "ObjectIdentifier" property, but they don't have an ID. On the methods of all the objects inside the application, I can also see the "QuerySelector" as an option available.
My question is: How can I use the ObjectIdentifier property inside the QuerySelector method? I have already tried the following:
Assuming "ObjectIdentifier" = "uniqueOI"
page.QuerySelector("[ObjectIdentifier=uniqueOI]") <- does not return an object
page.QuerySelector("[id=uniqueOI]") <- does not return an object
page.QuerySelector("#uniqueOI") <- does not return an object
Anyone has any idea of how to make the QuerySelector work to find an object by it's object identifier property?
Thanks.
hello sonya_m, no, unfortunately the reply had nothing to do with my question (except for the fact that the word "QuerySelector" is mentioned both in my post and the reply).
Anyway, after several attempts I concluded that it is not possible to use the ObjectIdentifier property in the QuerySelector method.
I'll have to keep using the default FindObject method (which is terribly slow), until I can request to modify the HTML code of our application to insert the proper IDs so I can switch to the QuerySelector as my default method to find elements.