Forum Discussion

bewen's avatar
bewen
Occasional Contributor
2 years ago

TestComplete doesn't show click method on inspection but it will appear in browser

Hi, I am currently having issues attempting to click a icon button within my application. TestComplete is able to find the element through the FindChildByXPath method however, when TestComplete attempts to click the button I recivev an error saying "Click is not a function". 

 

Through further investigation within the Chrome inspect element "Click" is listed as an event listener. But in TestComplete this method does not appear. Is therre anyway to work around this issue?

 

Thank you for any help!

 

note: Some title and class names have been changed for the examples. Within the screenshot for the methods shown by TestComplete the remainder of the list that cannot be seen also does not show a Click method. 

  • bewen's avatar
    bewen
    Occasional Contributor

    Yeah I will defiantly have a word with them. The empty <span> just contains a charet character. I appreciate your help, thank you for the time!

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    bewen :

    Hi,

     

    If your project is Java or JScript-based, try to call not .Click(), but native .click() method. (lowercased initial 'c')

    I.e.:

    <SpanFoundByXPath>.click();

     

    Does this help?