Guest User

Untitled

a guest
Jun 6th, 2022
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. from time import sleep
  2. from selenium import webdriver
  3. from selenium.webdriver.chrome.service import Service
  4. from webdriver_manager.chrome import ChromeDriverManager
  5. from selenium.webdriver.common.by import By
  6. from selenium.webdriver.support import expected_conditions as EC
  7. from selenium.webdriver.support.wait import WebDriverWait
  8. from selenium.webdriver.chrome.options import Options
  9.  
  10. options = Options()
  11. options.add_argument('--headless')
  12. browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
  13. browser.get('https://www.udemy.com/join/login-popup/')
  14. timeout = 20
  15. email = WebDriverWait(browser, timeout).until(EC.presence_of_element_located((By.ID, "email--1")))
  16. email.send_keys("[email protected]")
  17. sleep(20)
Advertisement
Add Comment
Please, Sign In to add comment