Ask a Question

Getting Error while using contentDocument.Script.$("selector")

IAmSanjay
New Contributor

Getting Error while using contentDocument.Script.$("selector")

Hi All,

 

I am trying to find the element using the pageObject.contentDocument.Script.$("li a[href='xyz']")[0] and getting error 

 

"Object doesn't support this property or method"
 can anybody help me with this?
 
2 REPLIES 2
baxatob
Community Hero

Re: Getting Error while using contentDocument.Script.$("selector")

Hi,

 

What are you trying to do? 

AlexKaras
Community Hero

Re: Getting Error while using contentDocument.Script.$("selector")

Hi,

 

'$', usually, is a shortcut root function name provided by the jQuery library.
So you may either try to call this function from the page (not recommended unless you have no other choice) or use the means provided by TestComplete to search for the required web page element (link, in your case).

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: