Skip to content

Commit

Permalink
Fix AndroidChromeUser REMOTE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloFuente committed Apr 18, 2023
1 parent 7529de5 commit c646f66
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public class AndroidChromeUser extends BrowserUser {
public AndroidChromeUser(String userName, int timeOfWaitInSeconds) {
super(userName, timeOfWaitInSeconds);

String REMOTE_URL = System.getProperty("REMOTE_URL_ANDROID");
if (REMOTE_URL == null) {
REMOTE_URL = "http://172.17.0.1:4723/wd/hub";
}

ChromeOptions options = new ChromeOptions();
options.addArguments("no-first-run", "disable-infobars", "use-fake-ui-for-media-stream",
"use-fake-device-for-media-stream", "ignore-certificate-errors",
Expand All @@ -40,7 +45,7 @@ public AndroidChromeUser(String userName, int timeOfWaitInSeconds) {

URL url = null;
try {
url = new URL("http://172.17.0.1:4723/wd/hub");
url = new URL(REMOTE_URL);
} catch (MalformedURLException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit c646f66

Please sign in to comment.