Reading list data in an xpath using TC
Can you help me with how to read the list data from an xpath //*[@id="panelbar"] present in a webpage and store it in array/list using testcomplete, there is data in //*[@id="panelbar"]/li, //*[@id="panelbar"]/li and so on, ineed to store these data in an array/list
Solved! Go to Solution.
As per https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ms256086(v=vs.100), I think that XPath should be something like this:
However, as Marsha wrote, unless you are considering cross-platform testing, search methods provided by TestComplete (FindAllChildren(), etc.) are much more preferable.
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
Thank you Alex and Marsha!
@abishekhari007 did you give this suggestion a try?
Community and Education Specialist