Forum Discussion

Kavya35's avatar
Kavya35
Copper Contributor
Nov 24, 2021

Microsoft login page freezes while executing selenium tests in chrome browser

Hi,

According to this guide: https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad

We have created an app registration and configured our application to login with Microsoft.

As far as the normal usage is concerned, everything works fine.

However, if we are using the login in our automated selenium test suite, we are running into the following problem:

We have few test classes that are added in a Azure pipeline as jobs and each of the test classes starts by logging into Microsoft account in a chrome browser to open the application under test. When this pipeline is triggered, one or the other test class fails inconsistently to locate the element(either while entering password/user/clicking on a Sign-in button).

 

Error message: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.id: i0118 (tried for 20 second(s) with 500 milliseconds interval)

 

From the captured screenshot(attached file), we got to know that the login page freezes and never let the test class to run further even if the waiting time is increased.

The Microsoft login window shows without rendering any input fields.

 

It doesn't mean that the issue occurs only when the pipeline is triggered, it also occurs when we run the test locally through IDE(IntelliJ).

 

Note: This issue occurs once in a blue moon and if it occurs, it will be consistent over time.

2 Replies

Resources