Questions tagged [expected-condition]
144 questions
1
vote
1 answer
Selenium wait for all class elements
I'm trying to do a wait in which the driver waits until all the elements of the same class are located.
For Example:
If class is foo
I try:
WebDriverWait(driver, 5).until(EC.presence_of_element_located((By.CLASS_NAME, 'foo')))
I think this only…

AaravM4
- 380
- 1
- 4
- 21
1
vote
2 answers
NoSuchElementException: Message: no such element: Unable to locate element error while scraping the top 20 holder using Selenium and Python
I try to scrape the top 20 holder of a token on the ERC-20 chain. I use for that selenium.
It seems like the xpath's dont load/didnt have enough time?
I try to load this…

MaTok
- 353
- 3
- 16
1
vote
1 answer
How to click on GWT enabled elements using Selenium and Python
I'm working with Selenium as a newbie and also as a newbie developer.
I try to solve this XPath but with no results that is why I'm looking for help.
So I want to click in the checkbox which has a dynamic id but it is not that easy to find this…

Piotr_aka_Pyjter
- 45
- 2
- 6
1
vote
1 answer
How to switch Selenium focus within an iframe using Python
I am unable to select a checkbox from a drop down menu on site. The dropdown is inside a iframe and when i try and switch to the iframe i keep getting TimeoutException message:.
Below is the code I'm trying and the HTML. I am new to Python so any…

Chadc
- 53
- 4
1
vote
2 answers
How to get total number of nested frames inside the frame
Snapshot of Frame_top with 3 nested frames:
Code:
WebElement topframe = driver.findElement(By.xpath("//frame[@name='frame-top']"));
String frame1 = …

zara
- 99
- 1
- 8
1
vote
2 answers
Selenium fails test finding text but works in debug
Hi I am checking that the text in an element to ensure its displaying the expected text..
The test fails as it says it returns "" but when I run it in debug it gets the correct text. I have added in a thread.sleep(5000) and this fixes the test (im…

Reeves62
- 139
- 1
- 3
- 13
1
vote
2 answers
Selenium Combining multiple Expected conditions in Python
wait = (driver, 10)
wait.until(EC.presence_of_element_located((By.XPATH, '//td[@class="blah blah blah"]')))
wait.until(EC.visibility_of_element_located((By.XPATH, '//h1[text() = "yo yo"]')))
Is there a way to combine these two conditions into one…

Prab
- 464
- 3
- 13
1
vote
4 answers
How to enter numeric value in input field using Python Selenium?
I've got a script writing values into a web page, and all values write except for one field that keeps throwing up the following error:
(Screenshot provided b/c in other similar questions many comments said this is impossible to happen on a web…

Programming_Learner_DK
- 1,509
- 4
- 23
- 49
1
vote
2 answers
"TypeError: 'str' object is not callable" passing locator within expected_conditions through Python + Selenium
I'm receiving the following error:
Traceback (most recent call last): File "[redacted]", line 69, in
wait.until(EC.element_to_be_clickable(By.ID("RptViewer_ctl09_ctl04_ctl00_ButtonLink")))
TypeError: 'str' object is not…

ETLien
- 21
- 2
1
vote
1 answer
How do I check in Python Selenium if a user is already registered? (Magento Cloud)
Initial situation:
Currently I have defined several test cases in our project, including login and logout within a Magento cloud environment.
I currently used the Chrome Webdriver for this test.
Python and the latest Selenium version.
Problem…

Mornon
- 59
- 5
- 22
1
vote
0 answers
How to return the inner exception when a selenium timeout occurs?
I currently have a solution using Selenium WebDriver and .NET Framework, using the following code to create waits for interacting with web elements as part of our automation solution.
wait = new WebDriverWait(webDriver,…

chrizzie
- 13
- 3
1
vote
2 answers
Selenium wait for ExpectedConditions.attributeToBe is not behaving as expected
I am trying to do a wait.until on an element attribute as follows...
public static void WaitForElementSize(WebElement element, WebDriver driver, int timeoutInSeconds)
{
if (timeoutInSeconds > 0)
{
…

alex
- 135
- 3
- 17
1
vote
1 answer
EC don`t work with locators from another file
I am trying to seporate my locators from page object classes. And it works perfectry with driver.find_element. But if i an trying to use it with EC, like self.wait.until(EC.visibility_of_element_located(*OrderLocators.file_upload_in_process))
I get…

NiPa
- 93
- 1
- 14
1
vote
1 answer
How to manually use a protractor ExpectedCondition?
I'm new to protractor and I want to create an expect like this:
expect(elementIsVisible).toBe(true);
I saw that protractor has EC (expected conditions), namely EC.visibilityOf which seems to be what I'm looking for. However, I'm not entirely sure…

Adelin
- 7,809
- 5
- 37
- 65
1
vote
2 answers
Automate Ember.js application using Selenium when object properties are changed at run-time
I am trying to automate an Ember.js application using Selenium+TestNg.
The drop-down in the application has only one object property id. However every time i refresh the Page id gets change and there is not pattern.
Eg: First time i open a page…

Pawan Kumar Dwivedi
- 21
- 4