Aziza Hassan
Aziza Hassan

Reputation: 3

Automate a react native Android application using selenium

I'm trying to inspect element on react native app
but unfortunately I could not find any element on it, I have use ui automator viewer and appium inspector.

Can anyone help me please?

Upvotes: 0

Views: 2114

Answers (1)

dmle
dmle

Reputation: 3658

I have no problem to inspect react native application with appium desktop, you can check article on Sauce Labs blog with pretty good details and iOS RN app/python example.

It's a bit tricky to uniquely identify UI elements, but still possible with setting unique accessibilityLabel for the View on RN side and search for it with AccessibilityId locator strategy in Appium.

Provide more details in case you need additional help.

Unfortunately, without having accessibilityLabel in Views of RN app, you are limited to use xpath locator and search by element text, like "//android.widget.TextView[contains(text(), 'Skip')]".

Avoid using strict @text= as it might not work for every element ,e.g. if text split in 2 lines on some device.

Upvotes: 2

Related Questions