Fix AndroidChromeUser REMOTE_URL

pull/803/head
pabloFuente 2023-04-18 18:22:52 +02:00
parent 7529de5897
commit c646f66aab
1 changed files with 6 additions and 1 deletions

View File

@ -29,6 +29,11 @@ public class AndroidChromeUser extends BrowserUser {
public AndroidChromeUser(String userName, int timeOfWaitInSeconds) { public AndroidChromeUser(String userName, int timeOfWaitInSeconds) {
super(userName, 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(); ChromeOptions options = new ChromeOptions();
options.addArguments("no-first-run", "disable-infobars", "use-fake-ui-for-media-stream", options.addArguments("no-first-run", "disable-infobars", "use-fake-ui-for-media-stream",
"use-fake-device-for-media-stream", "ignore-certificate-errors", "use-fake-device-for-media-stream", "ignore-certificate-errors",
@ -40,7 +45,7 @@ public class AndroidChromeUser extends BrowserUser {
URL url = null; URL url = null;
try { try {
url = new URL("http://172.17.0.1:4723/wd/hub"); url = new URL(REMOTE_URL);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
e.printStackTrace(); e.printStackTrace();
} }