Chrome Drivers
Closed this issue · 5 comments
Hey Adam,
How do I update the chrome drivers as its complaining about my version of chrome (88) not being supported. I saw in the docs there was a update-sedriver command but does not look like this has been implemented. I know where to download the new drivers from I just dont know where I put them for the code.
Thanks
I found the location and have updated used this code but this is specific for chrome 88, ill try and update it to scrape the page for the right version:
Rename-Item "$Selenium_Module_location\chromedriver.exe" "chromedriver_old.exe"
Invoke-WebRequest -Uri "https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_win32.zip" -OutFile "$Selenium_Module_location\chrome.zip"
Expand-Archive -Path "$Selenium_Module_location\chrome.zip" -DestinationPath "$Selenium_Module_location"
Remove-Item "$Selenium_Module_location\chrome.zip"
No need to scrape for it, there's a redirect link that points at the latest.
See here: https://github.com/adamdriscoll/selenium-powershell/blob/master/Selenium-Binary-Updater.ps1
I did "Update-SeDriver", but the save destination is different.
assembiles
Selenium.psm1
if (! $PSBoundParameters.ContainsKey('Path')) {
$Path = $PSScriptRoot
if ($Path.EndsWith('Public')) { $Path = Split-Path -Path $Path } #Debugging
switch ($OS) {
'Linux' { $AssembliesDir = Join-Path -Path $Path -ChildPath '/assembiles/linux' }
'Mac' { $AssembliesDir = Join-Path -Path $Path -ChildPath '/assembiles/macos' }
'Windows' { $AssembliesDir = Join-Path -Path $Path -ChildPath '/assembiles' }
}
}
https://github.com/adamdriscoll/selenium-powershell/blob/master/Output/Selenium/Selenium.psm1
I will publish Preview3 today that will include this change.