Skip to content

Commit

Permalink
add htmlunit dependence
Browse files Browse the repository at this point in the history
Since htmlunit isn't in the selenium project we have to add it manually in the build.gradle.
(SeleniumHQ/selenium@05325a7#diff-1998ab834c50706eec2893da4561cc50)
  • Loading branch information
nicolasiltis authored and admin committed May 23, 2018
1 parent 7e17d56 commit d758075
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ dependencies {
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile ('org.seleniumhq.selenium:selenium-java:3.12.0') { exclude group: 'junit' }
testCompile 'org.seleniumhq.selenium:selenium-api:3.12.0'
testCompile 'org.seleniumhq.selenium:htmlunit-driver:2.29.0'
testCompile 'log4j:log4j:1.2.17'
testCompile 'args4j:args4j:2.0.16'
testCompile 'commons-configuration:commons-configuration:1.8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public int startZAP(String zapPath) throws Exception {
params.add("-config"); params.add("api.key="+API_KEY);
Config.getInstance().setProxyApi(API_KEY);
String upstreamProxyHost = Config.getInstance().getUpstreamProxyHost();
if (upstreamProxyHost.isEmpty()) {
if (!upstreamProxyHost.isEmpty()) {
int upstreamProxyPort = Config.getInstance().getUpstreamProxyPort();
log.info("Setting upstream proxy for ZAP to: "+upstreamProxyHost+":"+upstreamProxyPort);
params.add("-config"); params.add("connection.proxyChain.hostName="+upstreamProxyHost);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.openqa.selenium.firefox.internal.ProfilesIni;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;

import java.io.File;

Expand Down Expand Up @@ -170,7 +171,8 @@ public DesiredCapabilities createProxyCapabilities(String type) {
capabilities = DesiredCapabilities.firefox();
break;
case HTMLUNIT:
capabilities = DesiredCapabilities.htmlunit();
capabilities = DesiredCapabilities.htmlUnit();
break;
default:
break;
}
Expand Down

0 comments on commit d758075

Please sign in to comment.