Questions tagged [webdriverwait]
WebDriverWait : WebDriverWait which extends FluentWait<WebDriver> is a specialization of Class FluentWait<T> that uses WebDriver instances.
2,545
questions
0
votes
0
answers
15
views
Why are By.CSS and By.CLASS_NAME selectors not working efficiently when using Selenium and Python to scrape data from a website?
So I am trying to use selenium to find specific items on a webpage, but I want to make it universal for similar pages. My current code is below.
import time
from selenium import webdriver
from ...
-1
votes
1
answer
21
views
Selenium *appears* to be ignoring waits and running over itself
Selenium appears to be ignoring waits and running over itself
I'm using Selenium with Python (Chrome driver) to iterate through a list of terms, search them on my site, and grab some text.
However, I'...
0
votes
0
answers
27
views
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) error in Selenium
When I execute the following code:
'driver.findElement(By.xpath("//h5[text()='Users and Groups Management']")).click();'
I get the following error
Element info: {Using=xpath, value=//h5[...
0
votes
2
answers
33
views
Having trouble getting html from after a button is clicked/WebDriverWait is timing out when the condition is clearly met
I am trying to scrape https://www.broadwayworld.com/grosses/A-BEAUTIFUL-NOISETHE-NEIL-DIAMOND-MUSICAL but I want the html from after the "Show All" button is clicked. I know that the click ...
0
votes
2
answers
28
views
link is clickable in debug mode not in run mode
Here is the code I am using to click a link in the menu
public static void ClickOnALink(IWebDriver driver, string linkText)
{
if (driver != null)
{
IList<IWebElement&...
1
vote
2
answers
42
views
What is the best way to handle waiting for elements that are not always present with Selenium?
For example if I have a code like this:
<div id='parent'>
<div class='profile-pic'>...</div>
<p class='email'>I'm not always present</p>
<span class='name'>...
-1
votes
0
answers
13
views
The method getCell(int) is undefined for the type Object
In above line same error appears
the method getLastCellNum() is undefined for the type Object
and in below same
The method getCell(int) is undefined for the type Object.
1
vote
1
answer
35
views
Checkbox is not selected in selenium java. Tried everything but nothing worked
I'm trying to fill in registration page for this the user will first be on the sign up page where they have to enter name and email address and then click on Signup button. This will navigate to the ...
1
vote
1
answer
30
views
Unable to select value from dropdown python selenium
I am trying to pass/ select city name/station in Wunderground website, but unable select the city name from the dropdown list. From the below picture how to select "New York City,NY". Here ...
0
votes
0
answers
19
views
no such element: Unable to locate element: {"method":"css selector","selector":"#ext-gen275"}
getting unable to locate element exception
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(50));
driver.findElement(By.id("button-1205-btnIconEl")).click();
// String ...
0
votes
1
answer
44
views
Is there any way to refactor this selenium function to improve performance?
I am working on a discord bot that uses selenium to scrape a player's rank from Rocket League Tracker on command. The scrape_rank() function below is what I've come up with and it works (sometimes), ...
0
votes
1
answer
108
views
Selenium for Python wait conditions for elements with dynamic content
I am trying to help a friend with some script to automatically bill insurances on some website they use for billing. I'm using Selenium Webdriver and Python. The process requires picking options from ...
0
votes
1
answer
57
views
Webdriver for scraping articles from NYT search results
I'm trying to build a web scraper that can deal with the show more feature of the NY Times search results for a research project I'm taking part in.
I'm currently working on a driver to click the show ...
1
vote
1
answer
111
views
How to get the get data from span using Selenium Python
How to get the get data from span using Selenium Python.
Code trials:
import time
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common....
1
vote
1
answer
144
views
Selenium cant find element with xpath or ClassName or Css Selector (Python)
Hello I am trying to click The no thanks button on google look : enter image description here
The full element of the button is this
<button aria-label="No thanks" class="M6CB1c ...
2
votes
3
answers
95
views
How to make Selenium wait until the elements on the page are replaced (java)
For a graduation project, I am testing an online store using Selenium Webdriver and Java. I'm stuck in this part of the testing , where I have to check whether all search results (products) contains ...
2
votes
2
answers
75
views
Python: Selenium cann't finde the btn on pop-up window
I'm trying to click the btn "select all cookies" on cookies terms pop-up window.
I'v tried:
div=driver.find_element(By.XPATH,'//*[@id="js_cookie-settings-modal"]/div[2]/div/div[3]/...
1
vote
1
answer
124
views
NoSuchElementException: Message: no such element: Unable to locate element error scraping the Model names using Selenium Python
I'm trying to scrape data from the URL, but when I use the method find_elemnts() I get this error. I am trying to get some data. Here is my code:
from selenium import webdriver
from selenium....
-1
votes
2
answers
68
views
Unable to scrape text using By.CLASS_NAME in selenium
Every time I try to scrape the HTML of a page I get the same error:
selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: An invalid or illegal selector was specified
I know ...
1
vote
1
answer
111
views
Selenium does not find element using By.CLASS_NAME and raises NoSuchElementException
I'm using the following code to identify the Next button, but Selenium does not find it
driver = webdriver.Firefox(service=FirefoxService(GeckoDriverManager().install()))
driver.implicitly_wait(10)
...
0
votes
2
answers
41
views
Scrape pdfs links from dynamic content in div in Python with Selenium
I am trying to scrape some PDFs' links from the Bundestag's website.
There is an old question regarding the same very issue, but it does not provide an answer. However, I post it here for context and ...
0
votes
0
answers
35
views
How can I click Quarterly button on Yahoo financials and get Quarterly data instead of Annual data?
I want to navigate to https://finance.yahoo.com/quote/MSFT/financials?p=MSFT and click the quarterly button
This is my code so far:
def clickQuarterlyButton(url):
try:
options = Options()
...
1
vote
1
answer
34
views
NoSuchElementException selecting cell value based on header name by xpath
I would like to select a cell value with a known row index and selecting it by header name (here "Adjusted Amount")
My code is as follows:
driver.find_element(By.XPATH, value = f"/html/...
1
vote
0
answers
49
views
How do WebDriverWait throw a NoSuchElementException if there is no element found?
My code does not throw NoSuchElementException even if no element found using WebDriverWait ..
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium....
1
vote
1
answer
34
views
Why explicit wait don't throw an exception after first polling interval?
If explicitely wait is having default polling time i.e. 500ms then why don't it throws an exception after first 500ms if the condition is not satisfied?
What is the role of default polling time in ...
0
votes
3
answers
185
views
How to dismiss "Sign in to Google" popup using Selenium and Python
When I enter the google website, this small login window appears:
the tab that i tryind dimiss
I'm trying to dismiss it using selenium with pyhton
Here is the code i am using:
from selenium import ...
0
votes
1
answer
49
views
In python/selenium, how to get Amazon web page item ratings information
In python/selenium, I want to get the item star in Amazon web page, but failed .Anyone can help ? Thanks!
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver....
-1
votes
2
answers
125
views
How to extract the dates from the Upcoming Events section using Selenium Python
I tried to get these dates from the Upcoming Events on the page https://www.python.org/
I did this with my code
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ...
1
vote
0
answers
41
views
How to add Explicit Wait on Selenium?
I'm automating a task to export raw data from servicenow portal without API access. Hence, selenium comes to my mind.
I want the driver.execute_script to execute after it finds the element but i'm ...
2
votes
2
answers
84
views
Capture all data in tr tag within binance.com using Python Selenium
I am unable to read all the data in the tbody tag on the Binance futures page using python selenium. I try to scrape this link: https://www.binance.com/en/futures-activity/leaderboard/user/um?...
1
vote
2
answers
57
views
selenium.common.exceptions.ElementClickInterceptedException error clicking on a toggle button on yahoo finance income statement data
I am trying to webscrape Income Statement data from https://finance.yahoo.com/quote/AAPL/financials?p=AAPL
I am trying to simulate a click on Operating Expense to expand the row to see the Research ...
1
vote
2
answers
90
views
How to click on the pagination element on binance.com website with Selenium Python
Can't click on found element with Selenium python. I'm trying to scrape the link:
https://www.binance.com/en/futures-activity/leaderboard/futures
I have successfully scraped the first page, however, I ...
0
votes
2
answers
59
views
How to wait until div layer is hidden
I have this code which is used to click on a dropdown button:
Wait until is hidden:
new WebDriverWait(driver, Duration.ofSeconds(timeout)).until(ExpectedConditions.invisibilityOfElementLocated(By....
-1
votes
2
answers
145
views
How to input some text into input field using Selenium Python?
Code trials:
voucher_input = WebDriverWait(driver, 10).until(EC.presence_of_element_located ((By.NAME, "voucher")))
I tried changing the name for input field in code still didn't fix it
0
votes
1
answer
43
views
How to paste text into the descrpition field on Shopify by using Python Selenium
I wanna create a bot by using Python Selenium, which be able to paste value I gave for it. Headings and to select item - clear to me, but I don't know, how to paste text in description. For example:
...
0
votes
1
answer
39
views
Issues with finding element using Python Selenium
I am trying to copy data from the following website: https://imljail.shelbycountytn.gov/IML.
The site has two buttons, both labelled "Search." The button I want to press has the following ...
0
votes
0
answers
28
views
Check for Click of element then wait until element is disabled and has a specific text
I currently am working with a java/selenium project (written by another dev) where we loop through and excel sheet for the elements and their attributes and perform an action based on the condition (...
1
vote
1
answer
161
views
Webdriverwait in selenium java
WebDriver driver = new ChromeDriver();
WebDriverWait w =new WebDriverWait(driver,5);
I am getting an error for the second line. the error is "The constructor WebDriverWait(WebDriver,int) is ...
1
vote
1
answer
80
views
How to select a checkbox element with xpath?
I can fill Username/E-Mail and password but I can't click on a checkbox for personal security.
I have marked the problematic checkbox here:
Website: https://www.trendyol.com/uyelik
Below is what i ...
1
vote
1
answer
62
views
How to locate an element using Selenium by its visible text
I have this common situation where I want to locate an element by it's visible text, but the text is next to an i tag used for icons (not sure if this is valid HTML or not). It's the way a certain ...
1
vote
1
answer
54
views
Click on a non-select dropdown option using Selenium Python
I am trying to automate some task as download file and pre-process them. To download one of them I need to specify dates (I can't share the website because of privacy) but I am not able to select ...
0
votes
1
answer
34
views
Selenium C#: Can't find a button on Trello
I am trying to automate the Trello Activity extension, and I am trying to automatically press the button "Export to CSV" with Selenium.
And my code, I am trying to get the button with xPath:
...
0
votes
1
answer
42
views
Element could not be scrolled into view when trying to follow PayPal payment link
I'm using Python to try and follow a PayPal link/button but am unsure what element I need to select.
If I try to select the top level input (input id=paymentToken) with something like the following:
...
1
vote
1
answer
48
views
Selenium / select dropbox?
i try to use selenium with this site:
https://gesund.bund.de/suchen/aerztinnen-und-aerzte
with the following code:
import time
import os, sys
from selenium import webdriver
from selenium.webdriver....
1
vote
2
answers
111
views
How to close the promotion popup in makemytrip.com using selenium webdriver
I am not able to close the below window on https://www.makemytrip.com/ website:
I tried with alert, notification and child browser popup, but nothing had worked out.
Please anyone help on this?
1
vote
1
answer
108
views
How to correctly use WebDriverWait & presence_of_element_located() in 2023?
Here is the HTML I am detecting:
<div class="arrowPopup arrowPopup-start">
<div class="arrowPopupText arrowPopupTextTwoLine arrowPopupText-flashOn" style="white-...
1
vote
3
answers
208
views
How to click on a autocomplete item from a list using Selenium and C#
The web page https://www.priceline.com/?tab=cars&vrid=7fb0c3635c8e8e7633afe152907a052e has an <input> element. When I click on it and start typing a <div> with a list of items below ...
0
votes
1
answer
36
views
Pressing Button with Selenium Python
I am trying to press a button with selenium. The page comes up, but it does not press the button. I am new to this, and also the page as a GEO block for any one in the UK. I am using a windows 10 ...
0
votes
1
answer
28
views
What has more performance effect between invisibilityOfElementLocated() and invisibilityOf()
In one of the learning tutorials, I learned that invisibilityOfElementLocated(By.<locator>) has more performance improvements than the invisibilityOf(<web_element>).
Please can anyone ...
2
votes
1
answer
75
views
How to click 'View' button using Selenium on Wunderground Historical Weather page
I'm trying to access the "View" button on the "https://www.wunderground.com/history" website using Selenium in Python but I'm unable to do so. I've tried multiple methods including:...