Selenium 是支持web浏览器自动化的一系列工具和库的综合项目,Selenium 的核心是 WebDriver,这是一个编写指令集的接口,可以在许多浏览器中互换运行。




pip安装
1.1 下载pip
curl https://bootstrap.pypa.io/pip/get-pip.py -o get-pip.py
1.2 安装

通过pip安装selenium
pip install selenium
查看selenium
pip show selenium



vim ~/.profile
export PATH="$PATH:/usr/local/chromedriver"
source ~/.profile

chromedriver % xattr -d com.apple.quarantine chromedriver






new = 'window.open("https://service.homepartners.tech/sso/Account/Login?ReturnUrl=%2Fsso%2Fconnect%2Fauthorize' \
'%2Fcallback%3Fclient_id%3Dhpa-ctm-vendor-portal%26redirect_uri%3Dhttps%253A%252F%252Fvendor.homepartners.tech' \
'%252Fcallback%26response_type%3Dtoken%2520id_token%26scope%3Dopenid%2520profile%2520vendor-api%2520foundation' \
'-api%26state%3D5a6d7d6d84264b828f02081ac9fb1c3a%26nonce%3D7cb02e1da5214cd0828d4373b29e5b66"); '
driver.execute_script(new)

通过上述操作就可以做一些简单的demo,但如何出报表?如何工程化?以及后续怎么部署迭代?还需要进一步去学习