Esempio n. 1
0
 public void GivenIHaveOpenedMyEmailsTab()
 {
     MainWindow        = EC4.GetWindow(SearchCriteria.ByAutomationId("AgentDashboard"), InitializeOption.NoCache);
     MyEmailsTabButton = MainWindow.Get <Button>(SearchCriteria.ByAutomationId("MyEmailsTabButton"));
     MyEmailsTabButton.Click();
     Thread.Sleep(1000);
 }
Esempio n. 2
0
 public void ec4Main()
 {
     EC4                       = Application.Launch(@"D:\EchoContactClient.Host.exe.lnk");
     loginWindow               = EC4.GetWindow(SearchCriteria.ByClassName("Window"), InitializeOption.NoCache);
     loginTextBox              = loginWindow.Get <TextBox>(SearchCriteria.ByAutomationId("LoginField"));
     passwordField             = loginWindow.Get <TextBox>(SearchCriteria.ByAutomationId("PasswordField"));
     clientField               = loginWindow.Get <TextBox>(SearchCriteria.ByAutomationId("ClientField"));
     rememberMeCheckBox        = loginWindow.Get <CheckBox>(SearchCriteria.ByClassName("CheckBox"));
     loginButton               = loginWindow.Get <Button>(SearchCriteria.ByAutomationId("LoginButton"));
     deskSelection             = loginWindow.Get <ComboBox>(SearchCriteria.ByAutomationId("deskSelectionCombobox"));
     makeMeImmediatlyAvailable = loginWindow.Get <CheckBox>(SearchCriteria.ByAutomationId("makeMeImmediatelyAvailableCheckBox"));
     OkButton                  = loginWindow.Get <Button>(SearchCriteria.ByAutomationId("OkButton"));
     AgentDashBoard            = EC4.GetWindow(SearchCriteria.ByAutomationId("AgentDashboard"), InitializeOption.NoCache);
 }
Esempio n. 3
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);
        }
Esempio n. 4
0
 public void GivenIHaveLaunchedTheECApplication()
 {
     EC4         = Application.Launch(@"D:\EchoContactClient.Host.exe.lnk");
     loginWindow = EC4.GetWindow(SearchCriteria.ByClassName("Window"), InitializeOption.NoCache);
 }
Esempio n. 5
0
 public void ThenAgentDashboardWindowOpened_()
 {
     Thread.Sleep(1000);
     AgentDashBoard = EC4.GetWindow(SearchCriteria.ByAutomationId("AgentDashboard"), InitializeOption.NoCache);
     Assert.IsTrue(AgentDashBoard != null);
 }