Exemplo n.º 1
0
        public void DeleteEmployee(EmployeeDataRow row)
        {
            row.DeleteButton.Click();

            Loading();

            _wait.Until(ExpectedConditions.ElementToBeClickable(_driver.FindElement(By.ClassName("mdl-dialog__actions")).FindElements(By.TagName("button"))[0]));

            IWebElement button = _driver.FindElement(By.ClassName("mdl-dialog__actions")).FindElements(By.TagName("button"))[0];

            //Actions action = new Actions(_driver);
            //action = action.MoveToElement(button);

            //Loading();

            //action.Click().Perform();

            bool clicked = false;

            do
            {
                try
                {
                    button.Click();

                    clicked = true;
                }
                catch (WebDriverException e)
                {
                    continue;
                }
            } while (!clicked);

            Loading();
        }
Exemplo n.º 2
0
        public EmployeeDataRow GetLast()
        {
            EmployeeDataRow           result = null;
            IEnumerable <IWebElement> rows   = List.FindElements(By.TagName("tr"));

            if (rows.Count() - 1 > 0)
            {
                result = new EmployeeDataRow(_driver, rows.Count() - 1);
            }

            return(result);
        }
Exemplo n.º 3
0
        public void EditEmployee(EmployeeDataRow row)
        {
            row.EditButton.Click();

            Loading();
        }