无法加载文件或程序集“WebDriver,版本=2.35.0.0 ...”

2023-11-29

我按照“用于编码 UI 跨浏览器测试的 Selenium 组件".

但我已经下载了最新版本:

WebDriver.ChromeDriver.win32 2.4.0http://www.nuget.org/packages/WebDriver.ChromeDriver.win32/

硒-dotnet-strongnamed-2.37.0https://code.google.com/p/selenium/downloads/list

然后我在我的 64 位机器上安装了它们,但是当我尝试运行自动化测试时,Visual Studio 2013 出现了下一个问题:

System.IO.FileNotFoundException: Could not load file or assembly 
'WebDriver, Version=2.35.0.0, Culture=neutral, PublicKeyToken=1c2bd1631853048f' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

您遇到的主要问题是使用强名称(所谓的“签名”)程序集作为引用。 Microsoft 跨浏览器工具绑定到对specificSelenium .NET 绑定的版本。在这种情况下,跨浏览器工具的版本直接引用 .NET 绑定的 2.35.0。没有其他版本可以做到;你必须下载具体来说 那个版本.NET 绑定。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法加载文件或程序集“WebDriver,版本=2.35.0.0 ...” 的相关文章

随机推荐