Open sergiomap opened 1 month ago
@sergiomap thanks for the report!
Looks like you're trying to access the web-view element with a wrong test-id. In your logs:
DetoxException
No elements found for “MATCHER(id == “onetrust-banner-sdk”)”
Also, we are covering this scenario in our test suite (see here) so I believe this API isn't broken.
Regardless, I'm not sure why you got the error message like that. Seems like a different issue..
Note that this matcher should represent the react-native-webview. I recommend to capture the view-hierarchy and check its test-id.
What happened?
When I have multiple web views and want to select a specific one I got:
And it sends the app to background.
What was the expected behaviour?
Select the element in the desired web view.
Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
In what environment did this happen?
Detox version: 20.20.2 React Native version: 0.73.3 Has Fabric (React Native's new rendering system) enabled: (yes/no) Node version: 21.5.0 Device model: iPhone 15 iOS version: 17.2 macOS version: 14.4.1 Xcode version: 15.3 Test-runner (select one): jest
Detox logs
Detox logs
``` 10:31:04.888 detox[73793] i ws-client send message data: {"type":"invoke","params":{"type":"webAction","predicate":{"type":"id","value":"onetrust-banner-sdk","isRegex":false},"webPredicate":{"type":"id","value":"onetrust-accept-btn-handler"},"webAction":"tap"},"messageId":89} 10:31:04.889 detox[73793] B ws-client perform web view action: tap data: { "type": "webAction", "predicate": { "type": "id", "value": "onetrust-banner-sdk", "isRegex": false }, "webPredicate": { "type": "id", "value": "onetrust-accept-btn-handler" }, "webAction": "tap" } stack: Object.tap (/e2e/screens/beneficiaryScreen.js:64:19) Generator.next (Device logs
Device logs
``` [device.log](https://github.com/wix/Detox/files/15074619/device.log) ```More data, please!
if I use just:
await web.element(by.web.id('onetrust-accept-btn-handler')).tap()
it selects the element, but since I have more views I need to specify one.