【接口自动化】python+selenium基础实战--登录
安装好环境后,来试试一个基本的登录功能#
#-*-coding:utf-8-*-
from selenium import webdriver
import time
driver = webdriver,Chrome()
driver.get("http://localhost:63342/projectAutoTest/projectHtml/chapter1/pe riod2/index.html")
time.sleep(1)
driver.find element_by_id('email').send keys('tynam@test.com')
driver.find element by name('password').send keys('123')
driver.find element_by_id('btn-login').click()
time.sleep(30)
driver.quit()