Skip to main content
3 votes
Accepted

Selenium WebDriver - should explicit waits be held in the test method or within the page object?

The choice of such design lies mainly on the product under test, tool, and the language you use. My personal preference is to: Add it in Page objects if it's being reused many times If it's just ...
PDHide's user avatar
  • 11.1k
3 votes
Accepted

How to wait for gettext not to be empty for an element

I went through the source code of the expected condition, Thee browser.wait expects a promise that resolves to a condition, so i created a promise that resolves to true of getText()==='', else false:...
PDHide's user avatar
  • 11.1k
2 votes

Nested explicit wait does not work in Appium

Solution:1 From your code “wait.until (ExpectedConditions.visibilityOfNestedElementsLocatedBy (lastMessage, By.xpath(query)))” The expectation of the method (visibilityOfNestedElementsLocatedBy) used ...
Indium Software's user avatar
2 votes

Nested explicit wait does not work in Appium

When you use xpath that is to locate nested elements you have to start your query from .. Like String query = ".//*[contains(@resource-id, 'delivered_indicator')]"; https://selenium.dev/selenium/docs/...
wec's user avatar
  • 409
2 votes

Selenium WebDriver - should explicit waits be held in the test method or within the page object?

In my experience, it is best to put the waits in the Page Objects. The purpose of the waits are to wait for an element to be displayed or to have the page finished loading, etc (depending on the wait ...
Lee Jensen's user avatar
  • 2,240
2 votes

How to wait for JavaScript scroll action to finish in selenium?

I did this many years ago in Java and JavaScript so it may be out-dated but I use to scroll to an element and then call a JavaScript function which I injected into the webpage to check if scrolling ...
Ilyas Patel's user avatar
1 vote
Accepted

Which exception happens in Selenium when the wait isn't long enough?

Selenium Web Driver Wait types: Implicit Wait Explicit Wait Fluent Wait The Implicit Wait in Selenium is used to tell the web driver to wait for a certain amount of time before it throws a No Such ...
Alex Kulinkovich's user avatar
1 vote

Should automation scripts made in Selenium always contain wait calls?

It depends, but probably yes (yes - you should have waits). If you are interacting with web elements (and you are if you are using Selenium) that implies a network so there will be some change in ...
Mate Mrše's user avatar
  • 4,119
1 vote

How to deal with long running operations in End-2-End testing?

We do not have direct access to the system that is causing the long waits In the environments that you run your automated checks, you can stub out this system (e.g., using MockServer or WireMock), so ...
João Farias's user avatar
  • 10.9k
1 vote

Waiting for two events in Selenide

You can keep existing approach. SelenideElement extends WebElement so that all existing conditional stuff will be working. Selenide does not have own cross-element conditions. Only the ones which are ...
Alexey R.'s user avatar
  • 11.6k
1 vote

selenium.NoSuchElementException: Unable to locate element: #passwordNext

As per the Stack Trace Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: #passwordNext For documentation on this error, please visit: http://...
demouser123's user avatar
  • 3,532
1 vote

Selenium Implicit wait and Explicit Wait. does it really go on a loop and check for elements

Implicit wait implementation is itroduced in webdriver itself so how exactly it is implemented depends on the particulat webdriver manufacturer. When you set implicit wait in your code it just sends ...
Alexey R.'s user avatar
  • 11.6k

Only top scored, non community-wiki answers of a minimum length are eligible