質問

I'm getting the following exception when I try to run a test with FluentAutomation

A first chance exception of type 'System.IO.FileLoadException' occurred in FluentAutomation.Core.dll

Could not load file or assembly 'WebDriver, Version=2.25.1.0, Culture=neutral, PublicKeyToken=1c2bd1631853048f' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Here's the stack trace

at FluentAutomation.SeleniumWebDriver.b__0(TinyIoCContainer container)
at FluentAutomation.FluentTest.get_I()

I've got the latest version of selenium from nuget but seems like there's some kind of hardcoded required version from within the fluentautomation dll

FluentAutomation genuinely looks amazing so would be great to be able to use it in my project.

@stirno please help!


FluentAutomation and selenium 2.32.1.0 looks decidedly similar to my problem but I've downloaded the latest ChromeDriver from Nuget and I'm copying it into my bin directory as prescribed.

I've also tried downloading the latest from here and copying that in. No joy


I'm also using spec flow so here's my setup in case it helps...

[Binding]
public class WebScenario : FluentAutomation.FluentTest
{
    private readonly IObjectContainer objectContainer;

    public WebScenario(IObjectContainer objectContainer)
    {
        this.objectContainer = objectContainer;

        FluentAutomation.Settings.ScreenshotPath = @"C:\Work\Temp";
        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);
    }
}

The exception happens when I is accessed for the first time injecting it into the PageNavigator object

If you're interested you can download a really simple source example from github


So I got this working... I downloaded the FluentAutomation source from GitHub and built the latest dlls and dropped them in. Looks like this problem should be dealt with in the next release :D

役に立ちましたか?

解決

Getting the latest source from the github repo and dropping in the built dlls worked for me

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top