Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
slashetcshadow opened this issue Apr 4, 2019 · 2 comments

Comments

@slashetcshadow
Copy link

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
@kanimozhi007
Copy link

You need to unblock the files before execution.

@SPDEVGUY
Copy link

SPDEVGUY commented Sep 18, 2021

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants