selenium2.48+Firefox42报错,是不兼容吗
代码如下:# coding = utf-8
from selenium import webdriver
browser = webdriver.Firefox()
browser.get("http://www.baidu.com")
browser.find_element_by_id("kw").send_keys("selenium")
browser.find_element_by_id("su").click()
browser.quit()
出错:
Traceback (most recent call last):
File "C:\Python27\selenium_exercise\ex1.py", line 3, in <module>
browser = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 77, in __init__
self.binary, timeout),
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 47, in __init__
self.profile.add_extension()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_profile.py", line 91, in add_extension
self._install_extension(extension)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_profile.py", line 260, in _install_extension
if not os.path.isdir(os.path.dirname(os.path.join(tmpdir, name))):
File "C:\Python27\lib\ntpath.py", line 108, in join
path += "\\" + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 9: ordinal not in range(128)
报错字符集? 编码冲突 编码冲突
页:
[1]