vendredi 1 mai 2020

Selenium links request

I'm trying to download python.exe from the site using selenium. So I'm using that code:

    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    from selenium.webdriver.common.by import By
    from selenium.webdriver.support.ui import WebDriverWait
    from selenium.webdriver.support import expected_conditions as EC

    driver = webdriver.Chrome("C:\\Program Files\\chromedriver.exe")
    driver.get("https://www.python.org/downloads/")
    try:
        c = WebDriverWait(driver,10).until(EC.presence_of_element_located(By.LINK_TEXT,"Download 
    Python 3.8.2"))
        c.click()
    finally:
        driver.quit()

But the shell always say:

   TypeError: __init__() takes 2 positional arguments but 3 were given

What is the issue? Thank you




Aucun commentaire:

Enregistrer un commentaire