xiaozefeng / ubuntu-guide

0 stars 0 forks source link

Selunium 自动化 #16

Open xiaozefeng opened 3 years ago

xiaozefeng commented 3 years ago

Selenium 自动化

  1. install browser ( google-chrome or chromium)
  2. download webdriver : https://sites.google.com/a/chromium.org/chromedriver/downloads
    • unzip it
    • add to path : sudo ln -s /path/to/webdriver/chromedriver /usr/local/bin/chromedriver

Nodes: select suitable driver

  1. open the browser
  2. setttings -> about

Python Usage

  1. pip install selenium
  2. wite code: https://blog.csdn.net/a464057216/article/details/52717464
  3. run: python3 xx.py

Reference

https://www.selenium.dev/documentation/en/getting_started/

Other Automation Tool

puppeteer: https://github.com/puppeteer/puppeteer