Can't locate unique ID for react-native android app (Mobile Testing)

323 views
Skip to first unread message

Franchesca Danielle Gaoat

unread,
Oct 3, 2018, 1:13:46 AM10/3/18
to Selenium Users
Hi All,

I'm trying to automate a react-native android app. I am using Appium as my framework. I can't identify unique ID because react-native does not support resource-id. Can you suggest a solution/workaround? 

Thanks in advance

sachin patil

unread,
Oct 3, 2018, 8:15:15 AM10/3/18
to seleniu...@googlegroups.com
Post more info for the same with screenshot of app and inspected element.


Resource id does support for native app we have to use contains for it.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2412adf1-bc0d-4337-ab07-685a0a29e4b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Franchesca Danielle Gaoat

unread,
Oct 4, 2018, 3:16:48 AM10/4/18
to seleniu...@googlegroups.com
Hi, 

Here's the button that i want to inspect. And the inspect element of it. 

image (2).png
image (1).png

sachin patil

unread,
Oct 4, 2018, 4:26:50 AM10/4/18
to seleniu...@googlegroups.com
Try this 

driver.findelement(By.xpath("//android.widget.TextView[@text='REGISTER']")).click();


Please help me know if this works.

sachin patil

unread,
Oct 4, 2018, 11:43:57 PM10/4/18
to seleniu...@googlegroups.com
Did your problem solve?

Vikram

unread,
Oct 11, 2018, 4:44:27 AM10/11/18
to Selenium Users
Hi,

You should ideally discuss this topic in https://discuss.appium.io/

Regards,
Vikram
Reply all
Reply to author
Forward
0 new messages