Below is the Flow in the App,
I need to click on the edit button based on the specific ticket number but there is no parent value where i can check,
Below is the blocks in App
Ticket1
Ticket Number
Ticket Name
Edit Button
Ticket2
Ticket Number
Ticket Name
Edit Button
The elements path are as follows
Ticket1- Ticket Number- XCUIDElement20
Ticket1- Ticket Name XCUIDElement21
Ticket1- Edit Button XCUIDElement22
Ticket2- Ticket Number- XCUIDElement23
Ticket2- Ticket Name XCUIDElement24
Ticket2- Edit Button XCUIDElement25
Element Number always vary depending upon the number of tickets it display and in the APP all other elements follow the similar flow.
One Possible solution which is think is if i find the xpath element for first ticket number likeXCUIDElement[20] the remaining ones will be increase in the position , so edit button will be 22 so i can pass the xpath value number … Is there any way i can retrieve the xpath using get attribute?