The Wayback Machine - https://web.archive.org/web/20220321054641/https://github.com/SeleniumHQ/selenium/issues/8587
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDriverWait.until throws timeoutexceptioni on wrong thread #8587

Closed
idontusenumbers opened this issue Jul 30, 2020 · 2 comments · Fixed by #8702
Closed

WebDriverWait.until throws timeoutexceptioni on wrong thread #8587

idontusenumbers opened this issue Jul 30, 2020 · 2 comments · Fixed by #8702

Comments

@idontusenumbers
Copy link

@idontusenumbers idontusenumbers commented Jul 30, 2020

🐛 Bug Report

To Reproduce

Detailed steps to reproduce the behavior:

  1. new WebDriverWait(driver, Duration.ofSeconds(1)).until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.cssSelector(".doesntexist"))

Expected behavior

Exception is thrown on thread that called until()

Actual behavior

Exception is thrown on forkjoin pool, stacktrace does not indicate where on my actual test code the timeout occured.

Build info: version: '4.0.0-alpha-6', revision: '5f43a29cfc'

@AutomatedTester
Copy link
Member

@AutomatedTester AutomatedTester commented Sep 7, 2020

The test in

public void shouldThrowAnExceptionIfTheTimerRunsOut() {
TickingClock clock = new TickingClock();
WebDriverWait wait =
new WebDriverWait(mockDriver, Duration.ofSeconds(1), Duration.ofMillis(200), clock, clock);
assertThatExceptionOfType(TimeoutException.class)
.isThrownBy(() -> wait.until(d -> false));
}
needs to be modified if anyone wants to have a look.

anandbagmar added a commit to anandbagmar/selenium that referenced this issue Sep 15, 2020
…meoutException. Added new test to check if stack trace contains test name
anandbagmar added a commit to anandbagmar/selenium that referenced this issue Sep 16, 2020
…meoutException. Added new test to check if stack trace contains test name
@shs96c shs96c closed this in #8702 Sep 16, 2020
@kovalev007
Copy link

@kovalev007 kovalev007 commented Sep 18, 2020

@shs96c can we be sure that both problems from #8226 have been fixed?

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants