I am not sure what I am missing, but I installed Selenium module under PowerShell 7.1 and I cannot start chrome instance. I followed the steps below (from https://github.com/adamdriscoll/selenium-powershell):
Install-Module -Name Selenium -AllowPrerelease
$driver = start-SeChrome
I get this error:
start-SeChrome: The term 'start-SeChrome' is not recognized as a name of a cmdlet, function, script file, or executable program.
I also tried running the script from vscode, still the same problem. See the snapshot below.
Edit: I was able to remove the latest Selenium version, and installed module 3.0.1. I had to uninstall the old one, delete the related module folders, kill all the session, and install 3.0.1. Now the command is available, but I am getting this error:
MethodInvocationException: Exception calling ".ctor" with "2" argument(s): "unknown error: cannot find Chrome binary"
See the snapshot below.
I appreciate your help.
I solved the problem by following the steps below:
chromedriver.exe
in ...\PowerShell\Modules\Selenium\3.0.1\assemblies
which is compatible with with the installed version of Chrome. Rename the existing one to be on the safe side.