1

I am unable to use the "I" variable when I call I.Open("http://google.com"); because it is being accessed from a static context. Worst case scenario, I could always use MSTest for selenium tests and MSpec for all others.

[Tags("Easy","Web")]
[Subject("Verify we can reach google.com.")]
public class ViewGoogleTest: FluentTest
{
    IActionSyntaxProvider result;

    Establish context = () =>
    {
        SeleniumWebDriver.Bootstrap(SeleniumWebDriver.Browser.Chrome);
    };

    Because of = () =>
    {
        result = I.Open("http://google.com");
    };

    It should_display_the_page = () => result.Find("#SomeId");
}
Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
Adam
  • 4,590
  • 10
  • 51
  • 84

1 Answers1

0

I found an example. Basically you create an instance of Selenium instead of the default inheritance shown in the documentation for Fluent Automation.

https://github.com/agross/mspec-samples/blob/master/WebSpecs/LoginApp.Selenium.Specs/LoginSpecs.cs

Adam
  • 4,590
  • 10
  • 51
  • 84