Search in sources :

Example 1 with WebConnectionHtmlUnitDriver

use of org.springframework.test.web.servlet.htmlunit.webdriver.WebConnectionHtmlUnitDriver in project spring-security by spring-projects.

the class WebTestClientHtmlUnitDriverBuilder method build.

public WebDriver build() {
    WebConnectionHtmlUnitDriver driver = new WebConnectionHtmlUnitDriver();
    WebClient webClient = driver.getWebClient();
    WebTestClientWebConnection webClientConnection = new WebTestClientWebConnection(this.webTestClient, webClient);
    WebConnection connection = new DelegatingWebConnection(driver.getWebConnection(), new DelegateWebConnection(new HostRequestMatcher("localhost"), webClientConnection));
    driver.setWebConnection(connection);
    return driver;
}
Also used : WebConnection(com.gargoylesoftware.htmlunit.WebConnection) DelegatingWebConnection(org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection) DelegateWebConnection(org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection.DelegateWebConnection) DelegatingWebConnection(org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection) DelegateWebConnection(org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection.DelegateWebConnection) WebConnectionHtmlUnitDriver(org.springframework.test.web.servlet.htmlunit.webdriver.WebConnectionHtmlUnitDriver) WebClient(com.gargoylesoftware.htmlunit.WebClient) HostRequestMatcher(org.springframework.test.web.servlet.htmlunit.HostRequestMatcher)

Aggregations

WebClient (com.gargoylesoftware.htmlunit.WebClient)1 WebConnection (com.gargoylesoftware.htmlunit.WebConnection)1 DelegatingWebConnection (org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection)1 DelegateWebConnection (org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection.DelegateWebConnection)1 HostRequestMatcher (org.springframework.test.web.servlet.htmlunit.HostRequestMatcher)1 WebConnectionHtmlUnitDriver (org.springframework.test.web.servlet.htmlunit.webdriver.WebConnectionHtmlUnitDriver)1