[SOLVED] App logging in via Auth0 (internal browser, callback) - cannot find the correct PageSource/elements

Scenario to be automated:

  1. Open app and click the Login button
  2. A browser opens on a Auth0 login page
  3. Enter credentials and confirm
  4. Redirected to app, logged in per the credentials

Issue: In step 3, the login HTML inputs are not in the PageSource.
I’m using the Appium Nuget package, C# bindings.

Observations made:

  1. According to the developer, the login screen is opened in an internal browser inside of the web application, wrapped by the native app.

  2. When launching the app, there are 2 Contexts (NATIVE and WEBVIEW_OurApp)

  3. When the browser for Auth0 has opened, there is a 3rd Context available (WEBVIEW_Chrome)

  4. Switching to this new Context does not provide me with the elements of the Login page. Rather, I only get the following (relevant) DIV element:

    https:/ourapp.auth0.com/authorize?client_id=abc&response_type=token%20code&redirect_uri=com.ourdomain.ourapp%3A%2F%2Fourapp.auth0.com%2Fcordova%2Fcom.ourdomain.ourapp%2Fcallback&audience=https%3A%2F%2Four-api.ourapp.be&scope=openid%20offline_access&auth0Client=abc%3D%3D

Anyone some ideas on how to make this flow work please?

Just posting the solution to this weird issue:

There was (is) some kind of configuration or installation issue with my Appium. I fixed it by installing the Appium Desktop software and starting a server session there (instead of via code). Then I simply used this server session in code, which works fine.

Additionally, when running the faulty case before, the Appium icon never appeared in the notification bar. When running correctly, the icon should always be visible.

Finally, I noticed that a device running Android 6.0.0 doesn’t work as intended also. It works fine with newer versions.