FluentAutomation and Selenium 2.33.0.0



当我尝试使用FluentAutomation运行测试时,我得到以下异常

第一次异常类型' system . io . fileloadeexception '发生在FluentAutomation.Core.dll

无法加载文件或程序集'WebDriver, Version= 2.24.1.0,Culture=neutral, PublicKeyToken=1c2bd1631853048f'或其中一个依赖关系。定位的程序集的清单定义不会匹配程序集引用。(Exception from HRESULT: 0x80131040)

这是堆栈跟踪

FluentAutomation.SeleniumWebDriver.b__0 (TinyIoCContainer容器)
在FluentAutomation.FluentTest.get_I ()

我已经从nuget中获得了最新版本的selenium,但似乎有某种硬编码要求的版本来自fluentautomation dll

FluentAutomation真的看起来很棒,所以如果能在我的项目中使用它就太棒了。

@stirno请帮忙!


FluentAutomation和selenium 2.32.1.0看起来与我的问题非常相似,但我已经从Nuget下载了最新的ChromeDriver,并按照规定将其复制到我的bin目录中。

我也试过从这里下载最新的并复制进去。没有欢乐


我也在使用规范流程,所以这里是我的设置,以防它有帮助…

[Binding]
public class WebScenario : FluentAutomation.FluentTest
{
    private readonly IObjectContainer objectContainer;
    public WebScenario(IObjectContainer objectContainer)
    {
        this.objectContainer = objectContainer;
        FluentAutomation.Settings.ScreenshotPath = @"C:WorkTemp";
        FluentAutomation.Settings.ScreenshotOnFailedExpect = false;
        FluentAutomation.Settings.ScreenshotOnFailedAction = false;
        FluentAutomation.Settings.DefaultWaitTimeout = TimeSpan.FromSeconds(1);
        FluentAutomation.Settings.DefaultWaitUntilTimeout = TimeSpan.FromSeconds(30);
        FluentAutomation.Settings.MinimizeAllWindowsOnTestStart = true;
    }
    [BeforeScenario("Web")]
    public void BeforeScenario()
    {
        FluentAutomation.SeleniumWebDriver.Bootstrap(FluentAutomation.SeleniumWebDriver.Browser.Firefox);
        objectContainer.RegisterInstanceAs<INativeActionSyntaxProvider>(I);
    }
}

当第一次访问I时将其注入PageNavigator对象时发生异常

如果你感兴趣,你可以从github下载一个非常简单的源代码示例


所以我让这个工作…我从GitHub下载了FluentAutomation源代码,构建了最新的dll并将它们放入。看起来这个问题应该在下一个版本中解决:D

从github repo获取最新的源代码并在构建的dll中为我工作

最新更新