Skip to content

Commit

Permalink
Switch to apache http client to see if that fixes the login issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Feb 7, 2018
1 parent 0702a5e commit 78bc740
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
import au.com.agic.apptesting.exception.DriverException;
import au.com.agic.apptesting.profiles.configuration.UrlMapping;
import au.com.agic.apptesting.utils.*;
import com.google.common.collect.ImmutableMap;
import io.vavr.Tuple2;
import io.vavr.control.Option;
import org.apache.commons.lang3.StringUtils;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.HttpCommandExecutor;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.internal.ApacheHttpClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -179,7 +182,12 @@ public synchronized FeatureState getDesiredCapabilitiesForThread(@NotNull final
final String remoteAddress =
"http://" + browserStackUsername + ":" + browserStackAccessToken + URL;

final WebDriver webDriver = new RemoteWebDriver(new URL(remoteAddress), desiredCapabilities);
final HttpCommandExecutor executor = new HttpCommandExecutor(
ImmutableMap.of(),
new URL(remoteAddress),
new ApacheHttpClient.Factory());

final WebDriver webDriver = new RemoteWebDriver(executor, desiredCapabilities);

threadIdToDriverMap.put(name, webDriver);

Expand Down

0 comments on commit 78bc740

Please sign in to comment.