Closed pranesh517 closed 1 year ago
@pranesh517, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
That expected condition assumes that the element is locatable on the page and is just not yet displayed.
You can fix by using just the locator: visibilityOfElementLocated(By.cssSelector(".oxd-userdropdown-tab"))
or, my recommendation, avoid ExpectedConditions
entirely and use a lambda with exactly what you want to wait for:
webDriverWait.until(d -> driver.findElement(By.cssSelector(".oxd-userdropdown-tab")).isDisplayed());
With ExpectedConditions
class the element is located before until()
is called, with the lambda, it is executed inside that context where the NoSuchElementException
gets caught and retried
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What happened?
With WebDriverWait provided for particular time with ExpectedConditions.visibilityOf(WebElement), execution gets terminated with org.openqa.selenium.NoSuchElementException: no such element quickly without waiting for provided time out.
How can we reproduce the issue?
Relevant log output
Operating System
macOS Bigsur
Selenium version
4.11.0
What are the browser(s) and version(s) where you see this issue?
Chrome 116
What are the browser driver(s) and version(s) where you see this issue?
Chrome Version 116.0.5845.110
Are you using Selenium Grid?
No