Skip to content
Advertisement

Could not get version for google-chrome with the command: powershell “$ErrorActionPreference=’silentlycontinue’ using WebDriver manager and Selenium

I’m trying to create a script using python that separate 2 kind of websites , the one with SPF included and the others with SPF , and classify them using python, so in the beginning it worked perfectly but these daysit gives me a message error that I don’t find a clue about it

JavaScript

The output message is as follows:

JavaScript

Advertisement

Answer

This error message…

JavaScript

…implies that the Webdriver Manager was unable to retrieve the version of the installed browser within the system through any of the below commands and query:

  • Get-Item -Path "$env:PROGRAMFILESGoogleChromeApplicationchrome.exe").VersionInfo.FileVersion
  • Get-Item -Path "$env:PROGRAMFILES(x86)GoogleChromeApplicationchrome.exe").VersionInfo.FileVersion
  • Get-Item -Path "$env:LOCALAPPDATAGoogleChromeApplicationchrome.exe").VersionInfo.FileVersion
  • reg query "HKCUSOFTWAREGoogleChromeBLBeacon" /v version
  • reg query "HKLMSOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstallGoogle Chrome" /v version

Deep Dive

This issue was discussed in details in the following discussions:

and was finally fixed through fix powershell determination and str concatenation


Solution

Upgrade webdriver-manager to the latest version of webdriver-manager 3.5.4

Advertisement