安装好环境后,来试试一个基本的登录功能#
#-*-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('[email protected]')
driver.find element by name('password').send keys('123')
driver.find element_by_id('btn-login').click()
time.sleep(30)
driver.quit()
标签:登录,python,selenium,driver,element,--,time,find From: https://www.cnblogs.com/yexy-a/p/17749173.html