准备工作
在Python3.6版本之后,在selenium和firefox有些不兼容
如果你出现的这样的错误`
>>> browser = webdriver.Firefox('C:\\Program Files (x86)\\Mozilla Firefox')
Traceback (most recent call last):
File "C:\Users\lxm123456\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\lxm123456\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 743, in __init__
restore_signals, start_new_session)
File "C:\Users\lxm123456\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1087, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
browser = webdriver.Firefox('C:\\Program Files (x86)\\Mozilla Firefox')
File "C:\Users\lxm123456\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium