import time from selenium import webdriver from lxml import etree from selenium.webdriver import ActionChains browser = webdriver.Chrome() # 设置浏览器窗口的位置和大小 browser.set_window_position(500,100) browser.set_window_size(1100,700) url = "https://www.yeves.cn/login" browser.get(url) username = browser.find_element_by_id("username").send_keys("33333") time.sleep(2) password = browser.find_element_by_id("password").send_keys('3333333') time.sleep(2) login = browser.find_element_by_id("login").click() time.sleep(10) browser.close()