Could not load file or assembly 'file:///D:\Powershell\PowerWebShot-master\WebDriver.dll'
I'm having the error below? Any ideas? Location of the webdriver is correct.
Add-Type : Could not load file or assembly 'file:///D:\Powershell\PowerWebShot-master\WebDriver.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) At D:\Powershell\PowerWebShot-master\PowerWebShot.ps1:81 char:1
- Add-Type -path $SeleniumDriverPath
-
+ CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand
New-Object : Cannot find type [OpenQA.Selenium.PhantomJS.PhantomJSOptions]: verify that the assembly containing this type is loaded. At D:\Powershell\PowerWebShot-master\PowerWebShot.ps1:82 char:56
- ... ions]$options = New-Object OpenQA.Selenium.PhantomJS.PhantomJSOptions
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
- FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
You need to unblock the files before execution.
This is likely because selenium has dropped support for PhantomJS from 3.14

