Forum Discussion

mkiewicz's avatar
mkiewicz
Occasional Contributor
8 years ago
Solved

EvaluateXPath finds object but FindAllChildren doesn't

I'm new to TestComplete after coming over from Selenium and C#, so apologies in advance if this question has been asked before. I am trying to set up the automation for a new product being developed ...
  • mkiewicz's avatar
    8 years ago

    I think I got it. It's a little bit of roundabout way to go about this, but it's effective and pretty easy. I take the page object and get a count of the results and use a for loop to a iterate through the,m. using the xpath for the results item tag (in this case it's ''//sts-people-search-results-item''). Taking the xpath and the index of the loop I have access to the underlying tags using xpath expressions that evaluate to an attribute as such to access a name (e.g. "//sts-people-search-results-item//a[@class="name']") . This removes the location dependency and allows my script to traverse the results

    Thanks!!!