0

I need to automate a mobile web application (iOS) using SeeTest tool. Application is full of dynamic content representing like there is a title followed by a paragraph and thus there are so many content in the same format (title and paragraph) when a user scrolls down the view. This content (including title/paragraph) will be changing always. The only one static element in the view is the main title, and if I want to identify and click on any content title after scrolling down there are no other static element is seen nearby that content. User can click on any title and it will navigate user to another screen.

This I want to automate, but could not find any way to get the unique XPath for the content since its properties like id, class, text, index are changing always.

zx485
  • 28,498
  • 28
  • 50
  • 59
sun
  • 1
  • 1

1 Answers1

0

Use Dynamic Xpath.

For an example if you know some text which will be unique in text then use contains to identify the element runtime

String date = "06/22/2019";

String Xpath = "//tr[@class='someClassName']/tr[contains(.,'"+date+"')]";
Shubham Jain
  • 16,610
  • 15
  • 78
  • 125