1

I'm working on mobile automation project (Using webdriverio, appium and appium-youiengine-driver https://github.com/YOU-i-Labs/appium-youiengine-driver )

I need a find an element, which selector (rntestid) one part is dynamic, other part is static. Selector each time looks differently Some this selector examples

1. BadgeTimer_56ab5c05-a3ct-8500-1f79
2. BadgeTimer_66ef0s25-e2bf-1234-1a76
3. BadgeTimer_12nj5i15-g4oy-0002-4f90
4. BadgeTimer_13eb5k78-u8qw-3480-2b49
5. BadgeTimer_90fb5v75-e2bf-7560-1k59

Always BadgeTimer_ is visible, but other part of selector is dynamic. How I can define it?

  • 1
    Use Contains in xpath. resource-id is attribute name. //*[contains(@resource-id,"BadgeTimer_")] (or) //*[starts_with(@resource-id,"BadgeTimer_")] – Ramkumar Jul 12 '22 at 09:09

0 Answers0