Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- from selenium.webdriver.chrome.service import Service
- from selenium.webdriver.chrome.options import Options
- from selenium.webdriver.support.ui import WebDriverWait
- from selenium.webdriver.common.by import By
- from selenium.webdriver.support import expected_conditions as EC
- options = Options()
- options.add_argument("start-maximized")
- webdriver_service = Service('C:\webdrivers\chromedriver.exe')
- driver = webdriver.Chrome(options=options, service=webdriver_service)
- wait = WebDriverWait(driver, 10)
- url = "https://portal.librus.pl/rodzina/synergia/loguj"
- driver.get(url)
- wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, "a.btn.btn-third.btn-synergia-top.btn-navbar.dropdown-toggle"))).click()
- wait.until(EC.element_to_be_clickable((By.XPATH, "/html/body/nav/div/div[1]/div/div[2]/div/a[2]"))).click()
- wait.until(EC.element_to_be_clickable((By.XPATH, "/html/body/main/div/div/div/div[1]/div[3]/div[1]/div[1]/input"))).send_keys("my username")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement