public void Fire(IWebDriver webDriver, string xPath, string[] inputValues) { IWebElement rowToBeClicked = TableOperations.GetMatchingRow(webDriver, xPath, inputValues); if (rowToBeClicked == null) { throw new NoSuchElementException("Row with given values not found."); } rowToBeClicked.Click(); }
public void Fire(IWebDriver webDriver, string xPathOfTheTable, string[] inputValues) { //find row IWebElement rowContainingTheElement = TableOperations.GetMatchingRow(webDriver, xPathOfTheTable, inputValues.Take(inputValues.Length - 1).ToArray()); if (rowContainingTheElement == null) { throw new NoSuchElementException("Not able to find matching row."); } //find element IWebElement elementToBeClicked = rowContainingTheElement.FindElement(By.XPath("." + inputValues.Last())); //click elementToBeClicked.Click(); }
public void Verify(IWebDriver webDriver, string xPath, string[] expectedValues) { Assert.IsNotNull(TableOperations.GetMatchingRow(webDriver, xPath, expectedValues)); }