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 
CodePudding user response:
Did you put an import statement at the top of your script?
Import-Module "{FullPath}\selenium-powershell\Selenium.psd1"
The "OR" between the Install statement and the Import statement in the docs does not make sense to me. You have to install once just to get the module on your computer, but you have to import at the top of the script so the script can find the installed module.
CodePudding user response:
I solved the problem by following the steps below:
- Installed the stable version of Selenium PowerShell module which is at the time is 3.0.1. When I installed the latest version 4.x it was not working for some reason.
- To remove the installed version, use PowerShell commands to remove it with Force, delete the related folders, and kill all related sessions.
- In the installed module path, put the file
chromedriver.exein...\PowerShell\Modules\Selenium\3.0.1\assemblieswhich is compatible with with the installed version of Chrome. Rename the existing one to be on the safe side. - To get the compatible driver, check https://chromedriver.chromium.org/downloads.
- Kill the sessions, and try again.

