File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
java/src/org/openqa/selenium/manager Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 21
21
import org .openqa .selenium .Beta ;
22
22
import org .openqa .selenium .Capabilities ;
23
23
import org .openqa .selenium .Platform ;
24
+ import org .openqa .selenium .Proxy ;
24
25
import org .openqa .selenium .WebDriverException ;
25
26
import org .openqa .selenium .json .Json ;
26
27
@@ -218,6 +219,17 @@ public String getDriverPath(Capabilities options) {
218
219
commandList .add (browserBinary );
219
220
}
220
221
222
+ Proxy proxy = (Proxy ) options .getCapability ("proxy" );
223
+ if (proxy != null ) {
224
+ if (proxy .getSslProxy () != null ) {
225
+ commandList .add ("--proxy" );
226
+ commandList .add (proxy .getSslProxy ());
227
+ } else if (proxy .getHttpProxy () != null ) {
228
+ commandList .add ("--proxy" );
229
+ commandList .add (proxy .getHttpProxy ());
230
+ }
231
+ }
232
+
221
233
if (getLogLevel ().intValue () <= Level .FINE .intValue ()) {
222
234
commandList .add ("--debug" );
223
235
}
You can’t perform that action at this time.
0 commit comments