Forum Discussion

IAmSanjay's avatar
IAmSanjay
New Contributor
7 years ago

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

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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).