* @return WebDriverConfiguration which can be used to configure a
* {@link PluggableHTTPManager}.
*/
private WebDriverConfiguration createWebDriverConfig() {
WebDriverConfigurationImpl webdConfig =
new WebDriverConfigurationImpl();
// indicate that the remapping filter should automatically
// silently follow HTTP response 302 redirects
webdConfig.setFollowRedirects(true);
// indicate that the webdriver should attempt to remap
// redirected URLs. This will only work if there is a rewrite
// manager
webdConfig.setRemapRedirects(true);
URLRewriteProcessConfiguration urlRewriteConfig =
new URLRewriteProcessConfiguration();
webdConfig.setRedirectRewriteManager(
urlRewriteConfig.getURLPrefixRewriteManager());
// indicate that if a redirect url cannot be remapped, we
// should not attempt to follow the original url.
webdConfig.setFollowUnsuccessfulRedirectRemaps(false);
return webdConfig;
}