0
votes

Scenario to be automated:

  • Open app and click the Login button
  • A browser opens an Auth0 login page
  • Enter credentials and confirm
  • 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:

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

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

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

  • Switching to this new Context does not provide me with the input 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?

1

1 Answers

0
votes

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.