Reputation: 11
I'm trying to automate a test with detox. The app under test is implemented using react-native but we have a screen that renders a WebView that load an url. In this case, I cannot use the accessibilityLabel or testID in order to access the elements displayed inside the WebView. Anyone know if there is a way to locate elements inside a WebView with detox?
Upvotes: 1
Views: 1610
Reputation: 111
Webview in Android was already implemented and iOS has been added from their release version: 20.19.1 (https://github.com/wix/Detox/releases/tag/20.19.1)
Please, follow the official doc for element interactions: https://wix.github.io/Detox/docs/api/webviews/
Upvotes: 0
Reputation: 49
It's finally possible to interact with webview elements in Detox (only Android currently).
Check out this link
Upvotes: 0
Reputation: 71
There is currently no way to do so https://github.com/wix/detox/issues/665
A work around could be done by using this but if running on different screen sizes the test would probably fail https://github.com/wix/detox/issues/334#issuecomment-335802212
Upvotes: 1