Ejemplo n.º 1
0
 public void OneTimeSetUpTest()
 {
     wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(2));
     webDriver.Manage().Window.Maximize();
     webDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(2);
     //Open Login Page
     webDriver.Url = baseURL;
     wait.Until((driver) => LoginPage.IsLoginPageOpened(driver));
     loginPageInstance = new LoginPage(webDriver);
     //Login as Teacher
     loginPageInstance.LogIn("sasha", "1234");
     wait.Until((d) => MainPage.IsMainPageOpened(d));
     mainPageInstance = new MainPage(webDriver);
     //Go to group's DP-093-JS students page
     webDriver.Url = baseURL + "/Students/Dnipro/DP-093-JS/list";
     wait.Until((d) => StudentsContent.IsOpened(d));
     //Open modal window 'EditStudentListWindow'
     mainPageInstance.CenterContainer.StudentsContent.EditButton.Click();
     wait.Until((d) => EditStudentListWindow.IsOpened(d));
     //Create new student for test
     mainPageInstance.ModalWindow.EditStudentListWindow.CreateStudentButton.Click();
     wait.Until((d) => EditStudentWindow.IsOpened(d));
     mainPageInstance.ModalWindow.EditStudentWindow.FillForm("Andrey", "Magera", 3, "137", "4.2", 1);
     mainPageInstance.ModalWindow.EditStudentWindow.SaveButton.Click();
     wait.Until((d) => EditStudentListWindow.IsOpened(d));
 }
Ejemplo n.º 2
0
 public void OneTimeSetUp()
 {
     wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(2));
     webDriver.Manage().Window.Maximize();
     webDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(2);
     //Open Login Page
     webDriver.Url     = baseURL;
     loginPageInstance = new LoginPage(webDriver);
     //Login as Teacher
     loginPageInstance.LogIn("sasha", "1234", wait);
     mainPageInstance = new MainPage(webDriver);
     //Go to group's LV-023-UX students page
     webDriver.Url = baseURL + "/Students/Lviv/Lv-023-UX/list";
     wait.Until((d) => StudentsContent.IsOpened(d));
     //Open modal window 'EditStudentListWindow'
     mainPageInstance.CenterContainer.StudentsContent.EditButton.Click();
     wait.Until((d) => EditStudentListWindow.IsOpened(d));
 }