0

I am currently new to Selenium and webscraping. I would like to click on button on a page. However, my program cannot find it using this Xpath:

/html/body/div[3]/header/div[1]/div/nav[1]/ul/li[8]/a

The HTML code: HTML screenshot

Is there something wrong with my Xpath? Can you please help me with that?

Thank you

Ahmed Soliman
  • 1,662
  • 1
  • 11
  • 16
Elise
  • 37
  • 6

1 Answers1

0
  wait = WebDriverWait(driver, 5)
  link= wait.until(EC.element_to_be_clickable((By.XPATH, "//*[contains(text(),'Twoje konto: trader122")))

Notes: Add below imports to your solution :

from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
SeleniumUser
  • 4,065
  • 2
  • 7
  • 30