前提准备:
1、安装python3.6并配置环境变量
2、安装selenium :pip install selenium
3、下载Google驱动:将chromedriver.exe 放在chrome浏览器安装目录下(同时设置用户环境变量path:C:\Program Files (x86)\Google\Chrome\Application
__author__ = 'kevin'
# -*- coding: UTF-8 -*-
from selenium import webdriver
import os
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
chromedriver = "C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe"
os.environ["webdriver.chrome.driver"] = chromedriver
driver = webdriver.Chrome(chromedriver)
url = 'http://pluscmstest.miaohealth.net/login.html'
driver.get(url)
diver.close()
driver.quit()