public IWebElement MarkRow(string rowName) { //var found = false; IWebElement rowFound = null; foreach (var rowElement in RowsElements) { JavaScriptExecuter.ScrollToElement(rowElement); if (!GetRowName(rowElement).Equals(rowName)) { continue; } //found = true; rowFound = rowElement; rowElement.ClickAndWait(); DriverManager.Driver.WaitForAjax(); break; } if (rowFound == null) { throw new NoSuchElementException("Row with name " + rowName + " does not exist in the table"); } return(rowFound); }
public void SelectRow(string rowName) { bool found = false; foreach (var rowElement in RowsElements) { JavaScriptExecuter.ScrollToElement(rowElement); // assuming the link to press is the first '_tagName' element var link = rowElement.FindElement(By.TagName(_linkTag)); // will find the first '_tagName' if (!GetRowName(rowElement).Equals(rowName)) { continue; } found = true; link.ClickAndWait(); break; } if (!found) { throw new NoSuchElementException("Row with name " + rowName + " does not exist in the table"); } DriverManager.Driver.WaitForAjax(); }
public bool DoesRowExists(string rowName) { var found = false; foreach (var rowElement in RowsElements) { JavaScriptExecuter.ScrollToElement(rowElement); if (!GetRowName(rowElement).Equals(rowName)) { continue; } found = true; break; } return(found); }
public void Blur() { JavaScriptExecuter.ExecuteScript("arguments[0].blur();", WebElement); }
public void Focus() { JavaScriptExecuter.ExecuteScript("arguments[0].focus();", WebElement); }
public void ExecuteAsyncScript(string script, params object[] args) { JavaScriptExecuter.ExecuteAsyncScript(script, args); }