#1.判断标题完全等于预期文本
res1 = EC.title_is("百度一下,你就知道")
print(res1(driver))

#2.判断标题部分等于预期文本
res2 = EC.title_contains("百度一下")
print(res2(driver))

#3.判断元素是否可见
el3 = driver.find_element(By.XPATH,".//input[@value='Visibility hidden']")
el3.click()
time.sleep(1)
locate = ("id","uv")
res3 = EC.visibility_of_element_located(locate)
print(res3(driver))

#4.判断元素是否在dom
res4 = EC.presence_of_element_located(locate)
print(res4(driver))


#5.判断弹窗是否出现
el5 = driver.find_element(By.NAME,"b1")
el5.click()
res5 = EC.alert_is_present()
print(res5(driver))

判断元素可见示例地址:https://sahitest.com/demo/visible.htm

判断弹窗示例地址:https://sahitest.com/demo/alertTest.htm