microsoft / EasyRepro

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

Use Another Account not selected during Login #1288

Closed jdpottle closed 2 years ago

jdpottle commented 2 years ago

When using the Login method with 5 parameters (private LoginResult Login(IWebDriver driver, Uri uri, SecureString username, SecureString password, SecureString mfaSecretKey = null, Action redirectAction = null)), it is supposed to click on Use Another Account if it sees the 'Pick an account' screen (attached). However, in my environment, it does not always work, sometimes take 2-3 minutes to work. I was able to fix it by adding a timeout value to the ClickIfVisible line. Current: driver.ClickIfVisible(By.Id(Elements.ElementId[Reference.Login.UseAnotherAccount]));

My change:

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

Is it possible to have this change made?

image

jdpottle commented 2 years ago

bug input incorrectly, opened another