From selenium import Webdriver
Driver = Webdriver. Firefox (Executable_path = "C:/insert/firefox/geckodriver.exe")
Driver.get ("http://www.baidu.com")
Driver.maximize_window ()
driver.find_element_by_id ("kw"). Send_keys ("Selenium")
driver.find_element_by_id ("su"). Click ()
# Driver.quit ()
1. Selenium downloaded via PIP, verified, version is 3.0.2
2.python version 3.5
3.Firefox 50.0.1
Environment description completed, as the first time using the Selenium module of small white, not satisfied with the Headless browser Phantomjs
Using Firefox+selenium+python
Always cannot open the browser to perform the action,
The following issues are excluded:
1. Find different versions of Webdriver
2. Download different versions of the browser http://blog.csdn.net/huilan_same/article/details/52615123
3. Finally on the Internet to see the following paragraph of words https://www.zhihu.com/question/49568096
1. Selenium 3.x, webdriver/firefox/webdriver.py __init__, executable_path= "Geckodriver"; 2.x is executable_path= " Wires
2. Firefox 47 or above, need to download third party driver, namely Geckodriver;http/docs.seleniumhq.org/download/ Third party Drivers, Bindings, and plugins below find Mozilla geckodriver, download to any computer any directory, extract the path to the PC's path (for Windows).
Python Selenium webderiver problems encountered