我正在 python 2.7 上使用 selenium webdriver 2.4 编写测试。
文档 (http://seleniumhq.org/docs/03_webdriver.html) 演示了如下操作选择表单元素的能力:
Select select = new Select(driver.findElement(By.xpath("//select")));
select.deselectAll();
select.selectByVisibleText("Edam");
我需要像这样在 python 中操作选择表单元素。但是我不知道要导入什么才能成功实例化 Select 对象。
我的导入语句应该是什么?
谢谢。
最佳答案
However I cannot figure out what to import to successfully instantiate the Select object.
它可以作为:
从 selenium.webdriver.support.ui 导入选择
关于python - 在 python 下的 webdriver 2.4 中,用于 Select 对象的正确导入语句是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7601270/