Forum Discussion

Bea's avatar
Bea
New Contributor
4 years ago
Solved

Missing checkbox

Hi all,   I'm testing a webpage in Chrome. I recorded the flow, but when I played back, TestComplete could not find the checkbox. I tried to select the object with drag the target and point and fix...
  • AlexKaras's avatar
    AlexKaras
    4 years ago

    Hi,

     

    Thank you for the screenshot. What is reported to test log if you execute this test?

    From what I see, I can make these notes:

    1. The operation (Call Object Method) where you are searching for the web element using .FindChildByXPath() method returns the object been found. In order to use this object later, you must create keyword test variable and assign this variable a value returned by .FindChildByXPath(). Use the Set Variable Value operation with the Last Operation Result option value for the Mode parameter.

    2. Sample code snippet that I provided previously assumed that the tested web page is referenced via the page variable, but in your keyword test the tested web page is referenced as pageIts20. So the code must be adjusted correspondingly.

    3. Use either approach with .FindChildByXPath() or the code that was provided as the alternative. Alternative code may be used as is (with corrected reference to page). If you decide to use .FindChildByXPath(), then you should assign the result of the search to variable (as mentioned in point 1) and then use this variable to call method .click() (note small first 'c') of the found object.