# 判断传入的元素是否可见 visibility_of_element_located() from selenium import webdriver import time from selenium.webdriver.support import expected_conditions as ec from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.by import By driver = webdriver.Chrome() driver.get("http://ibsaas-test-wps.rongdasoft.com/#/login") time.sleep(3) print(ec.title_contains('智慧')) #找元素 element =driver.find_element_by_class_name('el-input__inner阿松大 ') locator = (By.CLASS_NAME,'el-input__inner') #一直找元素,直到找到为止 WebDriverWait(driver,100).until(ec.visibility_of_element_located(locator))