我在Python中使用Selenium。我想得到.val()一个<select>元素,并检查它是我期望的。
这是我的代码:
def test_chart_renders_from_url(self):
url = 'http://localhost:8000/analyse/'
self.browser.get(url)
org = driver.find_element_by_id('org')
# Find the value of org?
我怎样才能做到这一点?Selenium文档似乎有很多关于选择元素但没有关于属性的内容。
一只甜甜圈
幕布斯7119047
相关分类