Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 wait for element and click
Hello world, I need some help Pray . I´m try to search and did´t find the solution or it was to confuse. Huh

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 Heart

this is my code:

from selenium import webdriver


browser.get("website link, for exemple")

import time


import time

Larz60+ wrote Mar-21-2020, 05:43 PM:
Please post all code, output and errors (in it's entirety) between their respective tags. I did it for you this time, Here are instructions on how to do it yourself next time.
1st only import packages once, usually at the start of the program
You need to learn more about scraping.
Please do the following tutorials:
web scraping part 1
web scraping part 2
Found it how I do. If some one have the same question is here the solution

from selenium import webdriver
from import By
from import WebDriverWait
from import expected_conditions as EC

def init_driver():
driver.wait=WebDriverWait(driver, 5)
return driver

def get_data(driver):
driver.get("website link")

Larz60+ wrote Mar-21-2020, 11:47 PM:
Please post all code, output and errors (in it's entirety) between their respective tags. Refer to BBCode help topic on how. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  bypassing find element click() windows11 1 67 Apr-02-2020, 11:55 AM
Last Post: Larz60+
  wait.until(EC.element_to_be_clickable) failed to click gahhon 4 1,447 Feb-23-2019, 04:58 AM
Last Post: gahhon
  Click Element if displayed using Selenium and Python giaco__mar 1 1,184 Dec-27-2018, 06:19 PM
Last Post: metulburr

Forum Jump:

Users browsing this thread: 1 Guest(s)