File tree Expand file tree Collapse file tree
java/src/org/openqa/selenium/manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import org .openqa .selenium .Beta ;
2222import org .openqa .selenium .Capabilities ;
2323import org .openqa .selenium .Platform ;
24+ import org .openqa .selenium .Proxy ;
2425import org .openqa .selenium .WebDriverException ;
2526import org .openqa .selenium .json .Json ;
2627
@@ -218,6 +219,17 @@ public String getDriverPath(Capabilities options) {
218219 commandList .add (browserBinary );
219220 }
220221
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+
221233 if (getLogLevel ().intValue () <= Level .FINE .intValue ()) {
222234 commandList .add ("--debug" );
223235 }
You can’t perform that action at this time.
0 commit comments