Selenium Basics

Feb 27th, 2020 - Now

清空输入框

driver.find_element_by_xxx('xxx').clear()

等待元素出现

from selenium.webdriver.support.wait import WebDriverWait

b=webdriver.chrome()
......

try:
    element = wait.until(EC.presence_of_element_located((By.XXX, 'value')))
finally:
    b.quit()

下拉框选择

// To do

Reference

Last updated