microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
521 stars 288 forks source link

[BUG] Use Another Account not selected during Login #1289

Open jdpottle opened 2 years ago

jdpottle commented 2 years ago

Bug Report

Issues should only be created for items related to covered functionality.

Not covered functionality, feature requests, and questions should use the Feature Request or Question templates.

EasyRepro Version

UCI or Classic Web

Online or On Premise

Browser

Describe the bug
When using the Login method with 5 parameters, it is supposed to click on Use Another Account if it sees the 'Pick an account' screen (attached). However, in my environment, it sometimes take 2-3 minutes to work

Special formatting / display

Code to reproduce

Login method

private LoginResult Login(IWebDriver driver, Uri uri, SecureString username, SecureString password, SecureString mfaSecretKey = null, Action redirectAction = null)

Line causing the issue

driver.ClickIfVisible(By.Id(Elements.ElementId[Reference.Login.UseAnotherAccount]));

Expected behavior

Button should be clicked within a few seconds, not 2-3 minutes Screenshots

Additional context

The following line seems to fix the issue

driver.ClickIfVisible(By.Id(Elements.ElementId[Reference.Login.UseAnotherAccount]),TimeSpan.FromSeconds(2));