Skip to content

Commit

Permalink
[JS] support Selenium Manager using proxy info from options
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha509 committed Jun 5, 2023
1 parent 23e13a9 commit ba63816
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions javascript/node/selenium-webdriver/common/seleniumManager.js
Expand Up @@ -94,6 +94,16 @@ function driverLocation(options) {
args.push('--browser-path', '"' + vendorOptions.binary + '"')
}

// Get the httpProxy and sslProxy values from the options object
const httpProxy = options.getProxy()['httpProxy'];
const sslProxy = options.getProxy()['sslProxy'];

if (httpProxy) {
args.push('--proxy', httpProxy);
} else if (sslProxy) {
args.push('--proxy', sslProxy);
}

const smBinary = getBinary()
const spawnResult = spawnSync(smBinary, args)
let output
Expand Down

2 comments on commit ba63816

@titusfortner
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diemol / @bonigarcia I'm not a proxy person. Does it matter the order we pick these if they are different? Should ssl come first?

@diemol
Copy link
Member

@diemol diemol commented on ba63816 Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess http is the common option

Please sign in to comment.