首页 新闻 会员 周边

python + selenium 打开火狐浏览器时出现错误

0
[待解决问题]

当写到第三句是出现错误应该怎么解决?

>> driver = webdriver.Firefox()
>>> driver.get("http://www.baidu.com")
>>> driver.find_element_by_id("kw").sends_keys("selenium")

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    driver.find_element_by_id("kw").sends_keys("selenium")
AttributeError: 'FirefoxWebElement' object has no attribute 'sends_keys'

新手测试的主页 新手测试 | 菜鸟二级 | 园豆:206
提问于:2017-12-05 22:28
< >
分享
所有回答(1)
0

has no attribute 'sends_keys'

ycyzharry | 园豆:25653 (高人七级) | 2017-12-06 10:35
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册