Hello world, I need some help
. I´m try to search and did´t find the solution or it was to confuse.
I'm trying to wait for the element to be visible in the website to open, right now I have a time, but some times the internet is slow and I can´t open. I would like to have something like "wait until the element appear and click()"
thank you
this is my code:


I'm trying to wait for the element to be visible in the website to open, right now I have a time, but some times the internet is slow and I can´t open. I would like to have something like "wait until the element appear and click()"
thank you

this is my code:
from selenium import webdriver browser=webdriver.Firefox(executable_path="C:\\Users\\Sabrina\\Desktop\\geckodriver-v0.26.0-win64\\geckodriver.exe") browser.get("website link, for exemple www.youtube.com") import time time.sleep(8) browser.find_element_by_xpath("/html/body/div[2]/main/div/div[2]/section[1]").click() import time time.sleep(8) browser.find_element_by_xpath("/html/body/div[2]/main/div[2]/section[1]").click()