Skip to content Skip to sidebar Skip to footer

Selenium Webdriver - Python - Leboncoin - Pb To Select A Button With An Accent

I am trying to fill in a form automatically on the following website: 'https://www.leboncoin.fr/' I have recorded a script with Selenium IDE. I have a function to connect automatic

Solution 1:

As per your question to click on the tab / link with text as Déposez une annonce you can use the following line of code :

  • To click the TAB with text as Déposez une annonce use :

    WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//li[@class='deposer']/a[contains(@href,'//www2.leboncoin.fr/ai?ca=') and contains(.,'une annonce')]"))).click()
    
  • To click the BUTTON with text as Déposez une annonce use :

    WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//div[@class='create']/a[contains(@href,'//www2.leboncoin.fr/ai?ca=') and contains(.,'une annonce')]"))).click()
    

Post a Comment for "Selenium Webdriver - Python - Leboncoin - Pb To Select A Button With An Accent"