Training day4-python-Selenium request library

 

  

Today contents:
a library Selenium request

 

Selenium request a library
1. What is selenium?
selenium is an automated testing tool that can help me through the code
to achieve the drive browser automatically performs the appropriate action.
So we can use it for reptiles.

2. Why use selenium?
The main purpose is to use selenium to skip the login authentication.

3. The installation and use
- drive Download:
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 install selenium or settings installed

- Install Google Chrome
...

Selenium the webdriver Import from 
Import Time 
'' ' 
drives two ways browser 
' '' 
# Script files directly to a first folder for driver 
Driver = webdriver.Chrome () 
the time.sleep (. 5) 
driver.close () 
# fill in the second drive path 
# webdriver.Chrome ( 
# r'C: \ the Users \ the Dell \ Downloads \ chromedriver.exe ')

  

 

Guess you like

Origin www.cnblogs.com/ytt-1216/p/11099312.html