day4 python Selenium request library

Today contents: 
a library Selenium request



a library Selenium request
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. 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
- PyPI = Index ( 'https://pypi.tuna.tsinghua.edu.cn/simple')

- PIP3 install the Selenium settings or install

- 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/zhylouqi/p/11100332.html