Questions tagged [expected-condition]
144 questions
0
votes
1 answer
wait_for_non_empty_text() under Selenium 4
I have successfully used wait_for_non_empty_text() from this discussion:
How to wait for presence of an element with non empty content?
in my Selenium v3 project, but after upgrade to Selenium 4, there is no longer _find_element() function in…

SLB
- 101
- 1
- 1
- 4
0
votes
2 answers
How to make sure that a web element is completely loaded and ready with selenium expected_conditions
I am using selenium to retrieve data from a web page. I use expected_conditions selenium module in order to make the code more robust and to avoid having long sleeps in order to make sure that the data is loaded and can be used.
Unfortunately I…

Tompa Hawk
- 3
- 3
0
votes
0 answers
Selenium function frame_to_be_available_and_switch_to_it() isn't working
Selenium's frame_to_be_available_and_switch_to_it() doesn't seem to be waiting long enough in Python.
When I run the code with the commented line for the program to sleep I can find my dates, however when it is commented my dates are not found since…

Cacheell
- 1
- 1
0
votes
1 answer
Waiting for elements to become interactible reliably
I'm a noob and trying to automate some online form filling in a certain site. My problem is that some buttons need some time before clicking them, otherwise they don't work (but no error!, execution continues).
My only solution so far is to add a…

Cos Dim
- 101
- 4
0
votes
2 answers
Selenium Webdriver Java with TestNG & POM: Should we use explicit wait (ExpectedConditions) for all the web elements
In my project, the web application code is developed by a third party. The client does not know if ajax or other technologies are used which might load web elements at different times.
We are automating the testing of the web application using…

ravi kumar
- 3
- 4
0
votes
1 answer
Selenium Webdriver in Python- using expected_conditions.element_to_be_clickable with Webelement as parameter
Currently I am trying to add an explicit wait to a script I am working on in which the WebElement already exists, but may not yet be in a clickable state.
I am trying to use the following syntax:
WebDriverWait(browser,…

agaff
- 1
0
votes
1 answer
javascript error: Right-hand side of 'instanceof' is not an object error using expected_conditions with Selenium Python
I have some code in selenium/python, which used to work, But now I'm getting:
javascript error: Right-hand side of 'instanceof' is not an object
I don't know if it's something that was changed in the angular application, or how this error is…

skimchi
- 1
- 1
0
votes
0 answers
Selenium two expected conditions with one timeout counter
I wonder if there is a way to use selenium expected conditions where there are two code scenarios for two expected conditions and only one time period to wait (same timeout counter exception);
I mean:
if expected condition 1 ---> code scenario…

Ahmed
- 1
- 1
0
votes
1 answer
Selenium Python extracting information from a website and dumping it into JSON Format
I'm trying to open a Hotel website www.booking.com and extract the name, price, location, and link from the top 50 search results which are sorted by cheapest first. I'm using Selenium python to automate the process However some HTML elements are…
0
votes
1 answer
selenium Webdriver wait until expected conditon not working properly on Amazon EC2 instance
I made a script to visit a page and log in then get a download link from the page.
The script works fine on my local window machine, but it's not working on Amazon EC2 instance(ubuntu)
The code is as below
from selenium import webdriver
from…

Young-Kwang Oh
- 45
- 6
0
votes
2 answers
How to get the value of a nested td elements using selenium python
I am trying to get the value of the 3rd tag in each in the table.
I tried:
math_grade = wait.until(EC.presence_of_element_located((By.TAG_NAME,'./body/div/div[1]/div[5]/div[1]/table/tbody'))).text
print(math_grade)
but it didn't work,…
0
votes
1 answer
Correct syntax for By.PARTIAL_TEXT_LINK in Selenium Python
How to click using By.Partial_Text_Link in a proper way?
There is probably a syntax error, but pycharm doesn't give me a solution.
The searched element is not found, the program stops.
The faulty code looks like this:
WebDriverWait(driver,…

fedordima
- 47
- 5
0
votes
1 answer
Clicking on dropdown menu element works in Pycharm but not in server
There is a dropdown menu in which I need to click on the 2 item in list. So it works perfectly in Pycharm but not on server.
Code trials:
goods_count = WebDriverWait(driver, 5).until(EC.presence_of_element_located((By.XPATH,…

anfele
- 39
- 6
0
votes
2 answers
selenium.common.exceptions.TimeoutException error using send_keys() from Selenium Python
getting the error of timeout, tried to increase the time to 20, I see the page loading but still get the error and cannot see the email inserted to the field.
Code trials:
element = WebDriverWait(driver, 10).until(
…

Diana Brook
- 11
- 1
0
votes
3 answers
expected expression before 'struct' on c
I tried to make a userdata where it's declared as a struct. I tried to use scanf, but everytime i tried to compile it always says "expected expression before 'userdata'.
Anyone know how to fix this? Thank you
Here's my code:
#include…

ChocBanana
- 1
- 3