public void FillLogInForm(RegistrationUser user)
 {
     Email.SendKeys(user.Email);
     Password.SendKeys(user.Password);
     RememberMeCheckBox.Click();
     LoginButton.Click();
 }
Exemplo n.º 2
0
 public void LogInUser(string username, string password)
 {
     UserNameField.SendKeys(username);
     PasswordField.SendKeys(password);
     RememberMeCheckBox.Click();
     LogIn.Submit();
 }
Exemplo n.º 3
0
        public LoginPage SwitchRememberMe(bool side)
        {
            if (!RememberMeCheckBox.IsChecked && side)
            {
                RememberMeCheckBox.Click();
            }

            return(this);
        }
Exemplo n.º 4
0
        public void GivenIHaveLaunchedApplictionWithCredentials(string login, string password, string client)
        {
            //Start application
            EC4 = Application.Launch(@"D:\EchoContactClient.Host.exe.lnk");
            Window LoginWindow = EC4.GetWindow(SearchCriteria.ByClassName("Window"), InitializeOption.NoCache);

            //Set login
            LoginTextBox = LoginWindow.Get <TextBox>(SearchCriteria.ByAutomationId("LoginField"));
            LoginTextBox.SetTextToTextbox(login);
            //Set password
            PasswordField = LoginWindow.Get <TextBox>(SearchCriteria.ByAutomationId("PasswordField"));
            PasswordField.SetTextToTextbox(password);
            //Set client
            ClientField = LoginWindow.Get <TextBox>(SearchCriteria.ByAutomationId("ClientField"));
            ClientField.SetTextToTextbox(client);
            //Check if remember me check box isn't selected
            RememberMeCheckBox = LoginWindow.Get <CheckBox>(SearchCriteria.ByClassName("CheckBox"));
            if (!RememberMeCheckBox.Checked)
            {
                RememberMeCheckBox.Click();
            }
            //Click Login button to open Desk selection window
            LoginButton = LoginWindow.Get <Button>(SearchCriteria.ByAutomationId("LoginButton"));
            LoginButton.Click();
            //Wait till desk selection window appears
            Thread.Sleep(40000);
            DeskSelection = LoginWindow.Get <ComboBox>(SearchCriteria.ByAutomationId("deskSelectionCombobox"));
            //Select make me immediatly available option
            MakeMeImmediatlyAvailable = LoginWindow.Get <CheckBox>(SearchCriteria.ByAutomationId("makeMeImmediatelyAvailableCheckBox"));
            if (!MakeMeImmediatlyAvailable.Checked)
            {
                MakeMeImmediatlyAvailable.Click();
            }
            //Click OK to open agent dashboard window
            OkButton = LoginWindow.Get <Button>(SearchCriteria.ByAutomationId("OkButton"));
            OkButton.Click();
            Thread.Sleep(2000);
        }
 public void RememberMe()
 {
     Browser.Wait();
     RememberMeCheckBox.Click();
 }