public void NoSuchElementExceptionByIndexTest() { var dropdownPage = new InternetPage(this.DriverContext) .OpenHomePage() .GoToDropdownPage(); Assert.That(() => dropdownPage.SelectByIndex(7), Throws.Nothing); }
public void SelectByIndexTest() { var dropdownPage = new InternetPage(this.DriverContext) .OpenHomePage() .GoToDropdownPage(); dropdownPage.SelectByIndex(1); Assert.AreEqual(dropdownPage.SelectedOption(), "Option 1"); }