📜  如何使用 selenium python 代码示例等待加载图标从页面中消失

📅  最后修改于: 2022-03-11 14:46:58.608000             🧑  作者: Mango

代码示例1
try:
  i = 0
  while(True):
    element = webDriverWait(driver, enter_number_of_seconds_to_wait).until(EC.visibility_of_element_located((By.XPATH, "ENTER_XPATH_HERE")))
    print("{} True".format(i))
    i += 1
except selenium.common.exceptions.TimeoutException:
  print("False")