-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: Fix Chromedriver download for version 115+ #28
fix: Fix Chromedriver download for version 115+ #28
Conversation
Chrome has a new distribution system since version 115.
@@ -77,12 +95,32 @@ class ChromeWebDriverInstaller extends WebDriverInstallerBase { | |||
* @return {!Promise} | |||
*/ | |||
async install(driverVersion, outputDirectory) { | |||
const majorVersion = parseInt(driverVersion.split('.')[0], 10); |
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.
nit; parseInt(driverVersion.split('.')[0], 10)
can be extracted to a function.
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.
parseInt is already a function, right?
* @return {!Promise} | ||
*/ | ||
async installNew_(majorVersion, driverVersion, outputDirectory) { | ||
let platform; |
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.
Line 155-169 can be extracted to a getPlatform
function
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.
No, the platform strings used in the old and new styles differ slightly.
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.
Ex: Before 115, it was mac_arm64 for Arm and mac64 Intel. From 115 on, it's mac-arm64 and mac-x64.
Ex: Before 115, it was win32 for Windows. From 115 on, it's win64.
Chrome has a new distribution system since version 115.