Exemplo n.º 1
0
        public void TestCellSelectorOnStudentsList()
        {
            //Navigating to Students Page

            TopMenu topMenuInstance = new TopMenu(driver);
            Actions builder         = new Actions(driver);

            builder.MoveToElement(topMenuInstance.TopMenuSection).Build().Perform();
            Acts.Click(topMenuInstance.StudentsItem);


            //Select group from LeftContainer

            mainPageClassInstance = new MainPageClass(driver);

            Acts.Click(mainPageClassInstance.LeftContainer.GroupsInLocation.GetGroupByName("DP-094-MQC"));

            //Go to table

            GroupView groupViewInstance = new GroupView(driver);

            groupViewInstance.EditButton.Click();

            //Select some cell using method CellSelector

            EditStudentList editStudentListInstance = new EditStudentList(driver);
            string          text = editStudentListInstance
                                   .StudentTable
                                   .GetCellBy2Keys("English level", "Reaper Carolina")
                                   .Text;

            Console.WriteLine(text);
        }
Exemplo n.º 2
0
        public void TestNewCellSelectorOnStudentsList()
        {
            //Navigating to Students Page

            TopMenu topMenuInstance = new TopMenu(driver);
            Actions builder         = new Actions(driver);

            builder.MoveToElement(topMenuInstance.TopMenuSection).Build().Perform();
            Acts.Click(topMenuInstance.StudentsItem);


            //Select group from LeftContainer

            mainPageClassInstance = new MainPageClass(driver);

            Acts.Click(mainPageClassInstance.LeftContainer.GroupsInLocation.GetGroupByName("DP-094-MQC"));

            //Go to table

            GroupView groupViewInstance = new GroupView(driver);

            groupViewInstance.EditButton.Click();

            //Select some cell using method CellSelector
            EditStudentList editStudentListInstance = new EditStudentList(driver);
            IWebElement     tableElement            = editStudentListInstance.StudentTable;
            Table           table = new Table(tableElement, driver);
            String          text1 = table.getValueFromCell(2, 2);
            String          text2 = table.getValueFromCell(2, "Name");

            Console.WriteLine(text1);
            Console.WriteLine(text2);
        }
Exemplo n.º 3
0
 public void BeforeTest()
 {
     //Initializations and logging in Caesar
     driver = new ChromeDriver();
     wait   = new WebDriverWait(driver, TimeSpan.FromSeconds(5));
     driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
     driver.Url = baseURL;
     driver.Manage().Window.Maximize();
     loginPageInstance = new LoginPage(driver);
     loginPageInstance.LogIn("sasha", "1234");
     wait.Until((d) => MainPageClass.IsMainPageOpened(d));
 }