Skip to content

Commit dd11365

Browse files
committed
CLDR-14409 make webdriver URL configurable
1 parent 5ce00f3 commit dd11365

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/test/java/org/unicode/cldr/surveydriver/SurveyDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public class SurveyDriver {
8484
* RemoteWebDriver and requires installation, see above comment about selenium-grid-start.sh
8585
*/
8686
static final boolean USE_REMOTE_WEBDRIVER = true;
87-
static final String REMOTE_WEBDRIVER_URL = "http://localhost:4444";
87+
static final String REMOTE_WEBDRIVER_URL = SurveyDriverCredentials.getWebdriverUrl();
8888

8989
public WebDriver driver;
9090
public WebDriverWait wait;

src/test/java/org/unicode/cldr/surveydriver/SurveyDriverCredentials.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class SurveyDriverCredentials {
2222

2323
private static final String PROPS_PASSWORD_KEY = "WEBDRIVER_PASSWORD";
2424
private static final String PROPS_URL_KEY = "SURVEYTOOL_URL";
25+
26+
private static final Object PROPS_WEBDRIVER_KEY = "WEBDRIVER_URL";
2527
private static String webdriverPassword = null;
2628

2729
private final String email;
@@ -102,4 +104,12 @@ public static String getUrl() {
102104
}
103105
return host;
104106
}
107+
108+
public static String getWebdriverUrl() {
109+
String host = getProperties().get(PROPS_WEBDRIVER_KEY).toString();
110+
if (host == null || host.isEmpty()) {
111+
host = "http://localhost:4444";
112+
}
113+
return host;
114+
}
105115
}

0 commit comments

Comments
 (0)