0

PowerShell 経由で WebDriver DLL を使用しようとしています。毎回次の例外が発生し続けます。

format-default : The following exception occurred while retrieving members: "Could not load file or 
assembly 'WebDriver, Version=2.48.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 
The system cannot find the file specified."
    + CategoryInfo          : NotSpecified: (:) [format-default], ExtendedTypeSystemException
    + FullyQualifiedErrorId : CatchFromBaseGetMembers,Microsoft.PowerShell.Commands.FormatDefaultCommand

これは私のコードです:

[Reflection.Assembly]::LoadFile("X:\WebDriver.dll")
[Reflection.Assembly]::LoadFile("X:\Winium.WebDriver.dll")
[Reflection.Assembly]::LoadFile("X:\Elements.Desktop.dll")
[Reflection.Assembly]::LoadFile("X:\Winium.Cruciatus.dll")


$options = [OpenQA.Selenium.Winium.DesktopOptions]::new()
$options

これは私の出力です:

GAC    Version        Location                                                                            
---    -------        --------                                                                            
False  v4.0.30319     X:\WebDriver.dll                                                                    
False  v4.0.30319     X:\Winium.WebDriver.dll                                                             
False  v4.0.30319     X:\Winium.Elements.Desktop.dll                                                      
False  v4.0.30319     X:\Winium.Cruciatus.dll                                                             
format-default : The following exception occurred while retrieving members: "Could not load file or 
assembly 'WebDriver, Version=2.48.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 
The system cannot find the file specified."
    + CategoryInfo          : NotSpecified: (:) [format-default], ExtendedTypeSystemException
    + FullyQualifiedErrorId : CatchFromBaseGetMembers,Microsoft.PowerShell.Commands.FormatDefaultCommand

ここで何が悪いのかわかりません。誰か助けてくれませんか?

4

1 に答える 1