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(); }
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); }
public void EditEmployee(EmployeeDataRow row) { row.EditButton.Click(); Loading(); }