-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add appium detox test id support #1359
Feature/add appium detox test id support #1359
Conversation
There's one more thing i'm looking at now, to complement this effort. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
About my comment here, I created a new PR to extend this one (and serve as replacement) that takes care of properly setting accessibility info so that elements are interactable in appium on android: |
Any chance we can get this merged in? |
I second @gfirmacionpear 's request to merge. Having the ability to use testIDs is much desired. |
Closing since #2001 has been merged. |
Summary
I'm looking to allow testing SVG elements with Appium or Detox automated testing tools.
To allow Detox,
testID
attribute must be implemented and relevant native attribute set.Appium can use
testID
on IOS but the attribute is not available for Appium testers on Android, and then they useaccessibilityLabel
(which sets content-description which is available for Appium).For both ios and android it is important to allow to set the "accessible" value (though for different usages and reasons) in order to make the element visible in Appium.
long story short. Support is required for:
testID
accessibliltyLabel
accessible
The attributes implement direct setters on native views, and you just need to know which attributes to set to match what is set for the base React Native views.
Test Plan
To test you can use Appium Desktop and see that setting the props makes the relevant props visible, in a similar manner to plain RN views. e.g. "content-description" would be set for "accessibiltyLabel" in android. "testID" would map the "name" in IOS.
For detox, in particular in Android, where it is different from Appium, it is possible to write a basic test in detox and run it.
What's required for testing (prerequisites)?
you will want detox and appium setups. and some basic tests.
What are the steps to reproduce (after prerequisites)?
For appium, best is to just view the relevant properties (testID and accessibilityLabel) in Appium desktop.
For detox, running a test successfully will work.
Compatibility
Checklist
README.md
__tests__
folder