Installation and use of the fourth day of selenium

selenium request library 
1. What is requesting library
selenium is an automated testing tool that can drive through the code to implement the browser to automatically perform an operation in response to a
2. Why you want to use selenium?
The main purpose of the use of selenium is to bypass the login authentication
3. Installation and Use
- Download Driver
http://npm.taobao.org/mirrors/chromedriver/2.38
- Download Request selenium Library
- Tsinghua modified Download Source Source
- D: \ python36 \ lib \ Site-Packages \ PIP \ Models \ index.py
- the PyPI Index = ( 'https://pypi.tuna.tsinghua.edu.cn/simple')
- PIP3 settings or install the install Selenium
from the Selenium Import webdriver
 # are two ways to drive a browser 
# first go directly to the Scripts folder for the drive 
# webdriver.Chrome () 
# A second driver to fill in the path 
# webdriver.chrome (r'E: \ Python \ Scripts \ chromedriver.exe ') 
# - install Google Chrome 
# ...... 
Import Time
driver=webdriver.Chrome()
time.sleep(5)
driver.close()

 

Guess you like

Origin www.cnblogs.com/requiem/p/11099669.html