@@ -70,46 +70,53 @@ public class EdgeDriverService extends DriverService {
70
70
public static final String EDGE_DRIVER_ALLOWED_IPS_PROPERTY = "webdriver.edge.withAllowedIps" ;
71
71
72
72
/**
73
- * Configures and returns a new {@link EdgeDriverService} using the default configuration. In
74
- * this configuration, the service will use the MSEdgeDriver executable identified by the
75
- * {@link #EDGE_DRIVER_EXE_PROPERTY} system property. Each service created by this method will
76
- * be configured to use a free port on the current system.
77
- *
78
- * @return A new ChromiumEdgeDriverService using the default configuration.
73
+ * System property that defines whether the MSEdgeDriver executable should check for build
74
+ * version compatibility between MSEdgeDriver and the browser.
79
75
*/
80
- public static EdgeDriverService createDefaultService () {
81
- return new EdgeDriverService .Builder ().build ();
82
- }
76
+ public static final String EDGE_DRIVER_DISABLE_BUILD_CHECK = "webdriver.edge.disableBuildCheck" ;
83
77
84
78
/**
85
- * @param executable The EdgeDriver executable.
86
- * @param port Which port to start the EdgeDriver on.
79
+ * @param executable The EdgeDriver executable.
80
+ * @param port Which port to start the EdgeDriver on.
87
81
* @param timeout Timeout waiting for driver server to start.
88
- * @param args The arguments to the launched server.
82
+ * @param args The arguments to the launched server.
89
83
* @param environment The environment for the launched server.
90
84
* @throws IOException If an I/O error occurs.
91
85
*/
92
86
public EdgeDriverService (
93
- File executable ,
94
- int port ,
95
- Duration timeout ,
96
- List <String > args ,
97
- Map <String , String > environment ) throws IOException {
87
+ File executable ,
88
+ int port ,
89
+ Duration timeout ,
90
+ List <String > args ,
91
+ Map <String , String > environment ) throws IOException {
98
92
super (executable , port , timeout ,
99
93
unmodifiableList (new ArrayList <>(args )),
100
94
unmodifiableMap (new HashMap <>(environment )));
101
95
}
102
96
97
+ /**
98
+ * Configures and returns a new {@link EdgeDriverService} using the default configuration. In
99
+ * this configuration, the service will use the MSEdgeDriver executable identified by the
100
+ * {@link #EDGE_DRIVER_EXE_PROPERTY} system property. Each service created by this method will
101
+ * be configured to use a free port on the current system.
102
+ *
103
+ * @return A new ChromiumEdgeDriverService using the default configuration.
104
+ */
105
+ public static EdgeDriverService createDefaultService () {
106
+ return new EdgeDriverService .Builder ().build ();
107
+ }
108
+
103
109
/**
104
110
* Builder used to configure new {@link EdgeDriverService} instances.
105
111
*/
106
112
@ AutoService (DriverService .Builder .class )
107
113
public static class Builder extends DriverService .Builder <
108
- EdgeDriverService , EdgeDriverService .Builder > {
114
+ EdgeDriverService , EdgeDriverService .Builder > {
109
115
110
116
private boolean verbose = Boolean .getBoolean (EDGE_DRIVER_VERBOSE_LOG_PROPERTY );
111
117
private boolean silent = Boolean .getBoolean (EDGE_DRIVER_SILENT_OUTPUT_PROPERTY );
112
118
private String allowedListIps = System .getProperty (EDGE_DRIVER_ALLOWED_IPS_PROPERTY );
119
+ private boolean disableBuildCheck = Boolean .getBoolean (EDGE_DRIVER_DISABLE_BUILD_CHECK );
113
120
114
121
@ Override
115
122
public int score (Capabilities capabilities ) {
@@ -168,9 +175,9 @@ public EdgeDriverService.Builder withAllowedListIps(String allowedListIps) {
168
175
@ Override
169
176
protected File findDefaultExecutable () {
170
177
return findExecutable (
171
- "msedgedriver" , EDGE_DRIVER_EXE_PROPERTY ,
172
- "https://github. com/SeleniumHQ/selenium/wiki/MicrosoftWebDriver " ,
173
- "https://msedgecdn.azurewebsites.net/ webdriver/index.html " );
178
+ "msedgedriver" , EDGE_DRIVER_EXE_PROPERTY ,
179
+ "https://docs.microsoft. com/en-us/microsoft-edge/webdriver-chromium/ " ,
180
+ "https://developer.microsoft.com/en-us/microsoft-edge/tools/ webdriver/" );
174
181
}
175
182
176
183
@ Override
@@ -196,6 +203,9 @@ protected List<String> createArgs() {
196
203
if (allowedListIps != null ) {
197
204
args .add (String .format ("--whitelisted-ips=%s" , allowedListIps ));
198
205
}
206
+ if (disableBuildCheck ) {
207
+ args .add ("--disable-build-check" );
208
+ }
199
209
200
210
return unmodifiableList (args );
201
211
}
0 commit comments