I try to combine check for two scenarios:
If startupcheck fails we get a try again button:
el = WebDriverWait(self.driver, 10).until(
EC.element_to_be_clickable((By.NAME, "Try again")))
Or startupcheck succeed we get a pin enter request in a custom object:
el = WebDriverWait(self.driver, 20).until(
EC.element_to_be_clickable((By.XPATH, "//Custom/Edit")))
How can this be combined into one check without having to check for both:
I tried the following:
check = WebDriverWait(self.driver, 20).until(
EC.element_to_be_clickable(
(By.XPATH, "//Custom/Edit") or (By.NAME, "Try again")
))
But only the first or
statement is checked.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…