New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli flag to specify chromedriver port #1620
cli flag to specify chromedriver port #1620
Conversation
I am new in this org as a contributor, let me know what else needs to be added. |
Hi @svkrclg looks great, thanks the addition! I'm on vacation, that's why the late merge. |
lib/chrome/webdriver/builder.js
Outdated
@@ -25,6 +25,9 @@ module.exports.configureBuilder = function(builder, baseDir, options) { | |||
} | |||
|
|||
const serviceBuilder = new chrome.ServiceBuilder(chromedriverPath); | |||
if (options.chrome.chromedriverPort) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This need either use lodash.get or you can add a check like:
if (options.chrome && options.chrome.chromedriverPort) ...
The reason is that even when you run Chrome, we aren't 100% you have set any options for Chrome (that's the way it works right now at least).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor thing!
Also, do you think it is a good idea to check whether the port is free or not before starting chromedriver? |
@svkrclg no I think that could up to the developer that starts the driver just as long as we push an error to the log if it fails. |
Verified it, in case of an invalid port, the Chromedriver error is pushed to |
Thank you @svkrclg !!! |
sitespeedio/sitespeed.io#3427