Ejemplo n.º 1
0
        public void SelectDropdownValueByValueIWebElementTest()
        {
            var elementActions = new ElementActions(Driver);

            Driver.Url = "http://the-internet.herokuapp.com/";
            elementActions.Click(Driver.FindElement(By.XPath("//a[text()='Dropdown']")));
            elementActions.SelectDropdownValueByValue(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.");
        }