程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Downloading and installing selenium in Python environment

編輯:Python

Use python Or other programming languages , do ui/web Browser automation ( test ) when , Some configuration is needed .

1, browser ; Since we do it web automation , You definitely need a browser , In general use Google / firefox .

2, install web driver drive . Because I use Google browser , What's installed here is  chrome driver drive .

2.1 Download the installation address ( Unofficial address , Domestic mirror address ):https://registry.npmmirror.com/binary.html

2.2 Find the corresponding directory , Click to enter

 

  Be careful :web driver The version of the driver needs to be compatible with the browser , Generally, it is version correspondence .

2.3 For example, I check the current chrome The version of the browser is 103.0.5060.xxxx


 

 2.4 Find the corresponding version to download , After clicking , Go to the next level

 

 2.5 After entering the next level , You can see the corresponding drive system of this version . My computer is Windows, So download win32 That's all right. (64 Bit and 32 Bit Download win32 that will do )

 

 2.6 After downloading to local , yes .zip The compressed file of , Just unzip it normally . After decompressing , Put the driver under the project directory that needs to be run , Because of the need to use .

 

3, Download the language binding package , stay pycharm Run the command inside :pip install selenium

 

4, Then you can go through python Run the driver browser .

 

 4.1  I opened Baidu's website here .

 


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved