From af905aaaea7209ed63d4d9f64e45222bdaa07bec Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 1 Sep 2015 00:53:00 +0200 Subject: [PATCH] Document HtmlUnit & WebDriver deps in reference manual This commit improves the documentation in the reference manual for the HtmlUnit & Selenium WebDriver integration in the Spring MVC Test framework by mentioning the group and artifact IDs required for this functionality. Issue: SPR-13299 --- src/asciidoc/testing.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/asciidoc/testing.adoc b/src/asciidoc/testing.adoc index 8f5850da53..3386c9d690 100644 --- a/src/asciidoc/testing.adoc +++ b/src/asciidoc/testing.adoc @@ -4382,6 +4382,10 @@ want to use the raw HtmlUnit libraries. [[spring-mvc-test-server-htmlunit-mah-setup]] ====== MockMvc and HtmlUnit Setup +First, make sure that you have included a test dependency on `net.sourceforge.htmlunit:htmlunit`. +In order to use HtmlUnit with Apache HttpComponents 4.5+, you will need to use HtmlUnit +2.18 or higher. + We can easily create an HtmlUnit `WebClient` that integrates with `MockMvc` using the `MockMvcWebClientBuilder` as follows. @@ -4642,6 +4646,9 @@ following sections to make this pattern much easier to implement. [[spring-mvc-test-server-htmlunit-webdriver-setup]] ====== MockMvc and WebDriver Setup +To use Selenium WebDriver with the Spring MVC Test framework, make sure that your project +includes a test dependency on `org.seleniumhq.selenium:selenium-htmlunit-driver`. + We can easily create a Selenium `WebDriver` that integrates with `MockMvc` using the `MockMvcHtmlUnitDriverBuilder` as follows.