wix / Detox

Gray box end-to-end testing and automation framework for mobile apps
https://wix.github.io/Detox/
MIT License
11.2k stars 1.92k forks source link

Support for testing system web browser and Android Custom Tabs #4406

Closed crazyvan closed 1 month ago

crazyvan commented 7 months ago

Description

Hi, I have an app which uses expo's AuthSession to authenticate users. Under the hood, on Android this uses Custom Tabs to open the browser and direct the user to the auth flow. Will Detox support testing this use case or is it outside the scope of the project? Thanks!

Your environment

Detox version: 20.18.5 React Native version: 0.71.12 Node version: 21.6.2 Device model: Pixel_8_Pro_API_34 OS: macOS 14.2.1 Test-runner (select one): jest

noomorph commented 7 months ago

@crazyvan, hi, could you elaborate more, please? It seems that we have now some feature parity between iOS/Android regarding web views, but I have a gut feeling that your problem is slightly more intricate than that.

crazyvan commented 7 months ago

After opening the app, you're presented with a Log in button. On tap, Expo's AuthSession library is used to perform a browser based OAuth flow:

A more brief description of the flow can also be found here.

konstantindt commented 6 months ago

Very similarly I have an App using Okta react native browser based authentication but cannot find if Detox supports testing screens behind such login.

bbialas commented 6 months ago

+1 I have exactly the same scenario as crazyvan. web.element doesn't see the webview.