selenium 登录Demo

#coding=utf-8
from selenium import webdriver
import time
driver = webdriver.Safari()
driver.get(“http://192.168.1.17:8090/login”)
time.sleep(3)
driver.find_element_by_id(“amount”).send_keys(“173”)
driver.find_element_by_id(“password”).send_keys(“123”)
driver.find_element_by_xpath(“/html/body/section/div/div[2]/div/form/input”).click()
time.sleep(4)
driver.quit()

Leave a Reply

Your email address will not be published.