There is a period of time did not complete the automatic test, today is ready to engage in, open Pycharm has run the script, found that Firefox is not open to do anything, Chrome also opened, but also do not do anything, instantly blinded, not good before, how suddenly ... Then open the whole.
Read the next version of Firefox, 51.xx, OK, Firefox always like to sneak upgrade, then uninstall the reload, and set he does not check the upgrade, nor automatically upgrade
First of all make clear selenium3.0 above version needs Firefox 48 and above version
I am the version of selenium 3.01, so download a firefox48.0.2 version
Firefox historical version download link: http://ftp.mozilla.org/pub/firefox/releases/
selenium3.0 above version use Firefox need to download a geckodriver.exe, so download a
Links: http://pan.baidu.com/s/1cKWJZg
Well run, found an error, "Plugin container for Firefox has stopped running"
Baidu, found to be plugin-container.exe this plug-in trouble, said is to remove this plugin or change a name can be, so found
C:\Program files\mozilla Firefox directory, the Plugin-container.exe changed to Plugin-container.exe.bak, in operation, OK, no problem
Looking at Chrome, I did not turn over the wall, Chrome will not automatically upgrade, how suddenly there is a problem, chromedriver.exe and chrome have compatibility issues, which version of which version of their own Baidu, see my chrome version 59.xxxx, Chromedriver.exe double-click to view the 2.20.xxxxx version, chrome59 should have a 2.24 chromedriver.exe, so download a
Download Link: http://pan.baidu.com/s/1eR9de98
Run, no problem.
At this point all the problems solved, you can play at random
Summarize my environment:
Selenium Version 3.0.1
Python 2.7
Firefox 48.0.2
Geckodriver.exe unknown, but with this link inside should be no problem
Chrome 59.xxx
Chromedriver.exe 2.24
Python+selenium Start Firefox and Chrome