public class JavascriptAlert extends TestFailureAwareRule
WebDriver.findElement(By) call,
which is caused actually by the alert which hangs the javascript processing. Alerts are unfortunately not visible
on screenshots, they do not result in javascript console or webdriver log entries. So the only possibility to get
this information is to try to fetch a possible alert message. This helps then the investigation.| Constructor and Description |
|---|
JavascriptAlert(SeleniumProvider seleniumProvider) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onError(org.junit.runner.Description description,
Throwable testFailure)
Called if the test has thrown an error.
|
after, apply, beforepublic JavascriptAlert(SeleniumProvider seleniumProvider)
protected void onError(org.junit.runner.Description description,
Throwable testFailure)
throws Throwable
TestFailureAwareRuleonError in class TestFailureAwareRuledescription - junit test description objecttestFailure - any error from the testThrowable - this will be added to testFailure as suppressed exception.
See Throwable.addSuppressed(Throwable)Copyright © 2017 willhaben internet service GmbH & Co KG. All rights reserved.