xxxxxxxxxx
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
driver = webdriver.Chrome(executable_path="C:\\chromedriver.exe")
driver.get("https://accounts.google.com/signup")
try:
elem = WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.ID, "elemID")))
except:
print("Element not found")
driver.quit()
xxxxxxxxxx
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
driver = webdriver.Chrome(executable_path="C:\\chromedriver.exe")
driver.get("https://accounts.google.com/signup")
try:
elem = WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.XPATH, "elmXPATH")))
except:
print("Element not found")
driver.quit()