PowerWebShot icon indicating copy to clipboard operation
PowerWebShot copied to clipboard

Could not load file or assembly 'file:///D:\Powershell\PowerWebShot-master\WebDriver.dll'

Open slashetcshadow opened this issue 6 years ago • 2 comments

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

slashetcshadow avatar Apr 04 '19 10:04 slashetcshadow

You need to unblock the files before execution.

kanimozhi007 avatar Aug 07 '19 14:08 kanimozhi007

This is likely because selenium has dropped support for PhantomJS from 3.14 image

image

SPDEVGUY avatar Sep 18 '21 17:09 SPDEVGUY