public void SelectDropdownValueByIndexIWebElementTest() { var elementActions = new ElementActions(Driver); Driver.Url = "http://the-internet.herokuapp.com/"; elementActions.Click(Driver.FindElement(By.XPath("//a[text()='Dropdown']"))); elementActions.SelectDropdownValueByIndex(Driver.FindElement(By.Id("dropdown")), 1); Assert.AreEqual("Option 1", elementActions.GetSelectedOption(Driver.FindElement(By.Id("dropdown"))).Text, "The selected dropdown values didn't match."); }