Could not load file or assembly 'WebDriver, Ve

2019-03-02 01:59发布

I followed steps of "Selenium components for Coded UI Cross Browser Testing".

But I had download the lastest version of:

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

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

then I installed those in my machine of 64bits but the Visual Studio 2013 present the next problem when I try to run automated test:

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].

1条回答
Animai°情兽
2楼-- · 2019-03-02 02:23

You're running into the main problem with using strong-named (so-called "signed") assemblies as references. The Microsoft cross-browser tools are bound to a reference to a specific version of the Selenium .NET bindings. In this case, the version of the cross-browser tools directly reference 2.35.0 of the .NET bindings. No other version will do; you'll have to download specifically that version of the .NET bindings.

查看更多
登录 后发表回答