adamdriscoll/selenium-powershell

I cannot start chrome instant using PowerShell and Selenium module.

Opened this issue · 4 comments

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:

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 appreciate your help.

Do you get an error of some kind for Import-Module Selenium?

I solved the problem by removing the latest one, install 3.0.1 and put the file chromedriver.exe the one that is compatible with my Chrome browser, must put it under powershell selenium folder to replace the existing one.

Why do we have to struggle? Why the latest version is not working?

When I installed the latest version I didn't get any error.

I added this pull request to update the README file:

#219

If this works, then you may close this ticket, or let me know if there is another solution.

@tarekahf the problem is what the message says.
There is no cmdlet with the name "start-SeChrome".

In fact you installed the module with parameter "-AllowPrerelease" you should have been installed V4.0.0-preview3.

In this version all cmdlets Start-[yourBrowser] has been merged with Start-SeDriver.

In your case you have to do the following:

Start-SeDriver -Browser Chrome -StartURL "https://www.google.com" -Switches DisableAutomationExtension

Stop-SeDriver

If you're getting an error message because of Chromedriver Version, you can update it:

Update-SeDriver -Browser Chrome -OS Windows