microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
513 stars 285 forks source link

avoid stay signed in message? #1357

Closed AdotMdot100 closed 1 year ago

AdotMdot100 commented 1 year ago

Is there a way to avoid the stay signed in message? I'm using Easyrepro with MFA and have my MFAsecret key defined in the app.config and during login, it will automatically enter my username, password, and 6 digit code but within about 30 seconds I receive the following that can only be bypassed by me interacting and clicking the element on screen:

image

public void UCITestCreateAccount() { var client = new WebClient(TestSettings.Options); using (var xrmApp = new XrmApp(client)) { xrmApp.OnlineLogin.Login(_xrmUri, _username, _password, _mfaSecretKey);

            xrmApp.Navigation.OpenApp(UCIAppName.MYCUSTOMAPP);

            xrmApp.Navigation.OpenSubArea("Workspace", "Organisations");

            xrmApp.CommandBar.ClickCommand("New");

            xrmApp.Entity.SetValue("name", "AM automated ui test" + " " + TestSettings.GetRandomString(5,15));

            xrmApp.ThinkTime(2000);

            xrmApp.Entity.SetValue("websiteurl", "UITest");

            xrmApp.Entity.Save();

        }

    }
Shakevg commented 1 year ago

AdotMdot100 Look on https://github.com/microsoft/EasyRepro/issues/1338

AdotMdot100 commented 1 year ago

Perfect thank you! @Shakevg changing the cookie control option to 0 in the browseroptions class file has done the trick for me!