<!-- Dependency unpack directory -->
<dependency.unpack.directory>${project.build.directory}/dependency-unpack</dependency.unpack.directory>
- <!-- Cannot use 9.3 or 9.4 because they sometimes reset the connection too early in case of errors -->
- <jetty.version>9.4.14.v20181114</jetty.version>
+ <jetty.version>9.4.38.v20210224</jetty.version>
<phantomjs.version>2.1.1</phantomjs.version>
</properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
- <jetty.version>9.3.7.v20160115</jetty.version>
+ <jetty.version>9.4.38.v20210224</jetty.version>
<phantomjs.version>2.1.1</phantomjs.version>
<testbench.version>4.2.2</testbench.version>
<testbench.api.version>7.7.14</testbench.api.version>
<packaging>war</packaging>
<properties>
<jetty.skip>false</jetty.skip>
- <jetty.version>9.3.21.v20170918</jetty.version>
+ <jetty.version>9.4.38.v20210224</jetty.version>
<server.name>jetty9</server.name>
</properties>
@Test
public void testInvalidApplicationClass() {
openTestURL();
- String exceptionMessage = getDriver().findElement(By.xpath("//pre[2]"))
+ String exceptionMessage = getDriver().findElement(By.xpath("//pre[1]"))
.getText();
String expected = "ServletException: java.lang.ClassNotFoundException: ClassThatIsNotPresent";
Assert.assertTrue(
WebElement heading = findElement(By.tagName("h2"));
- Assert.assertEquals("HTTP ERROR 500", heading.getText());
+ Assert.assertTrue("Unexpected heading: " + heading.getText(),
+ heading.getText().startsWith("HTTP ERROR 500"));
}
}
openTestURL();
$(LinkElement.class).get(2).click(5, 5);
disableWaitingAndWait();
- Assert.assertTrue("Page does not contain the given text",
+ String errorText = "Page does not contain the given text";
+ Assert.assertTrue(errorText,
driver.getPageSource().contains("HTTP ERROR 404"));
- if (!BrowserUtil.isIE(getDesiredCapabilities())) {
- Assert.assertTrue("Page does not contain the given text",
- driver.getPageSource().contains("Problem accessing /run/APP/"));
- }
+ Assert.assertTrue(errorText,
+ driver.getPageSource().contains("/run/APP/"));
+ Assert.assertTrue(errorText,
+ driver.getPageSource().contains(
+ "Request was not handled by any registered handler"));
}
@Test