Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

81
Views
How to use ID or resource ID contains locator for Android in WebdriverIO

I have a Android Native UI where I have:

  1. Find By: id, Selector: 76ggg-unique-ID-o9o
  2. Attribute - class: android.view.ViewGroup
  3. resource-id: 76ggg-unique-ID-o9o

Now I want to create a selector for this element in WebdriverIO where I can use contains unique-ID. I tried following but nothing worked.

'strategy': 'css selector',
'strategyVal': '[id*="unique-ID"]'
'strategy': 'css selector',
'strategyVal': '[id*=unique-ID]'
'strategy': 'xpath',
'strategyVal': '//*[contains(@id, "unique-ID")]'
'strategy': 'xpath',
'strategyVal': '//*[@id*="unique-ID"]'
'strategy': 'xpath',
'strategyVal': '//*[contains(@id, "unique-ID")]'

Any suggestion is appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

After doing some debugging I came to know it was taking some time to load UI. After waiting for few seconds, below locator strategy worked.

'strategy': 'xpath',
'strategyVal': '//android.view.ViewGroup[contains(@resource-id, "unique-ID")]'
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!