项目作者: breuerfelix

项目描述 :
chromedriver self updated binaries for all platforms
高级语言: Python
项目地址: git://github.com/breuerfelix/chromedriver-py.git
创建时间: 2018-09-18T07:25:15Z
项目社区:https://github.com/breuerfelix/chromedriver-py

开源协议:Apache License 2.0

下载


chromedriver-py

downloads and installs the latest chromedriver binary version for automated testing of webapps.
the installer supports linux, mac and windows operating systems.

this package is maintained by an automated update script on travis.
if a new chromedriver version is out, this package will automaticly get updated within a day.

installation

due to the way how the pipeline packages the binaries, you cannot install the package from github.
installing from pypi is the only option.

from pypi:

  1. $ pip install chromedriver-py

specific version:
choose your version here

  1. # example for chrome version 88
  2. pip install chromedriver-py==88.0.4324.96

usage

to use chromedriver just from chromedriver_py import binary_path.
you will get a string variable with the executable filepath for your operating system.

example

  1. from selenium import webdriver
  2. from chromedriver_py import binary_path # this will get you the path variable
  3. svc = webdriver.ChromeService(executable_path=binary_path)
  4. driver = webdriver.Chrome(service=svc)
  5. # deprecated but works in older selenium versions
  6. # driver = webdriver.Chrome(executable_path=binary_path)
  7. driver.get("http://www.python.org")
  8. assert "Python" in driver.title