如何使用selenium从禁用数据中获取数据?

时间:2016-06-21 10:04:41

标签: c# selenium selenium-webdriver webdriver

带有禁用下拉列表的示例图像: Sample image with disabled drop down

尝试:

formatNoMatches

1 个答案:

答案 0 :(得分:0)

WebElement select = driver.findElement(By.xpath("//select[@name='jobName']")); 
List<WebElement> all_Options = select.findElements(By.tagName("option");

string val1 = all_Options[0].getText();