Forum Discussion

aa1's avatar
aa1
Contributor
5 years ago
Solved

FindChildByXPath

Hi all,

 

I am a newbie on testcomplete. I am trying to use the FindChildByXPath to find/validate the title of the page. I am not sure what is wrong in this line. The error I get says 'label' is undefined. I have made sure that the classname is correct and ttl does populate the correct title name. All the line is supposed to do is to trturn back the obj so that next step I can compare the obj.contentText with the page title and confirm that it is the same.

 

obj = page.FindChildByXPath("//DIV[@class='classnameforrightColumn']/descendant-or-self::*[contains(text(),'" + CutOffString(ttl) + "')]");

 

Any ideas anyone? 

 

thank you.

 

  • aa1's avatar
    aa1
    5 years ago

    Hi TanyaYatskovska ,

     

    The issue solved by itself without me changing anything. I had updated the code base from the trunk. Seems that a change in some other part of the code got this issue fixed as well. Since I new to this and the project, I dont still have the full picture. But I think we can mark this as resolved since the issue is not there any more.

     

    thanks

6 Replies