0

I an trying to load the webdriver.dll file in my powershell ISE, But its saying that the working directory is invalid. If you could someone help me to load the driver that much appreciated.

Error Message

Regards Ananth

Your working directory

$workingPath = 'C:\Selenium'

# Add the working directory to the environment path.
# This is required for the ChromeDriver to work.
if (($env:Path -split ';') -notcontains $workingPath) {
    $env:Path += ";$workingPath"
}

Add-Type -Path "$($workingPath)\WebDriver.dll"
  • 1
    Did you unblock the file? https://stackoverflow.com/questions/34400546/could-not-load-file-or-assembly-operation-is-not-supported-exception-from-hres – Bernard Moeskops Aug 24 '21 at 09:17
  • Please post the error message as text - it will help other people find this question if they have the same problem. See https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question for more details – mclayton Aug 24 '21 at 12:09
  • PowerShell ISE will be deprecated [PowerShell ISE is no longer in active feature development](https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/ise/introducing-the-windows-powershell-ise?view=powershell-7) – Dennis Aug 24 '21 at 14:54

0 Answers0