Selenium1: python3.6.4+selenium3.0+chrome environment configuration

python 

1. For the download and installation of python3.6.4, see the python installation instructions. (this blog)

2. Install python's integrated compiler PyCharm.

PyCharm is a Python IDE created by JetBrains that supports macOS, Windows, and Linux systems.

PyCharm features: debugging, syntax highlighting, project management, code jumping, smart prompts, auto-completion, unit testing, version control...

PyCharm download address:  https://www.jetbrains.com/pycharm/download/

 

selenium

1. After python3.6.4 is installed, it comes with the pip tool. Install the latest version of selenium via the pip tool.

chrome

1. Install chrome browser

2. Install the webdriver corresponding to chrome, decompress it and put it directly in the installation directory corresponding to python

When using WebDriver to test on the Chrome browser, you need to download the driver corresponding to the native chrome browser from the URL http://chromedriver.storage.googleapis.com/index.html , the driver name is chromedriver;

The version of chromedriver needs to correspond to the native chrome browser in order to use it normally;

Step 1: Download the corresponding version of the chromedriver driver file. For the specific version, please refer to the correspondence table at the bottom of the article:

For example, the chrome browser version of this machine is: version 62.0.3202.94 (official version) (32-bit),

 

The corresponding chromedriver version is 2.33.

Step 2: Install the webdriver corresponding to chrome, decompress it and put it directly in the installation directory corresponding to python

Step 3: Configure pycharm, just open pycharm directly and add the environment you set in File–>settings–>project—>project interpreter, and it can run normally.

 

Attachment: Chrome version supported by chromedriver version 

chromedriver version Supported Chrome Versions
v2.37 v64-66
v2.36 v63-65
v2.35 v62-64
v2.34 v61-63
v2.33 v60-62
v2.32 v59-61
v2.31 v58-60
v2.30 v58-60
v2.29 v56-58
v2.28 v55-57
v2.27 v54-56
v2.26 v53-55
v2.25 v53-55
v2.24 v52-54
v2.23 v51-53
v2.22 v49-52
v2.21 v46-50
v2.20 v43-48
v2.19 v43-47
v2.18 v43-46
v2.17 v42-43
v2.13 v42-45
v2.15 v40-43
v2.14 v39-42
v2.13 v38-41
v2.12 v36-40
v2.11 v36-40
v2.10 v33-36
v2.9 v31-34
v2.8 v30-33
v2.7 v30-33
v2.6 v29-32
v2.5 v29-32
v2.4 v29-32

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324882363&siteId=291194637