Reputation: 21
I want to find a specific text using regex in a xpath.
This is my xpath:
locator: //*[@class = 'android.widget.TextView' and contains(@text,'PriceBottomBarDialog-selector')]
This "PriceBottomBarDialog-selector" remains constant, the beginning text keeps changing. Can anyone please help with the regex pattern?
Thank you
Upvotes: 1
Views: 134
Reputation: 193058
You were close. You need to fix up the xpath and you can use the Locator Strategy:
Xpath:
locator: //*[@class = 'android.widget.TextView' and contains(.,'PriceBottomBarDialog-selector')]
Upvotes: 1