Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

QuerySelector() method is not in my project. How do I get it?

$
0
0

Hello my company is using TestComplete. I recently started automating Web apps. Up until now, I used the Object Spy to map all elements on a web page. I need to use a CSS selector. I have tried to access the QuerySelector method in my script but it looks like it is not there.

 

When I run the following line:

okButton = webPage.QuerySelector("#cmdOkBtn");

 

It results in the following:

Unable to find the object QuerySelector("#cmdOkBtn"). See Additional Information for details.

The object with the specified attributes does not exist.

 

I know the ID i entered on my web page exists, as I can access it in the DOM. When I type "webPage." and then hit Ctrl+SpaceBar, the code completion window does not include QuerySelector in its list of methods. This is why I think it is not there. Is this an extension that needs added?


Viewing all articles
Browse latest Browse all 20755

Trending Articles