Python Selenium webderiver problems encountered

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.