Skip to content

Instantly share code, notes, and snippets.

@marcusoftnet
marcusoftnet / gist:2701744
Created May 15, 2012 13:25
FluentAutomationBrowser encapsulation
public class BrowserAutomation : FluentTest
{
public override void Setup()
{
ScreenshotOnAssertException = true;
ScreenshotPath = @"C:\temp\";
base.Setup();
}
}
@marcusoftnet
marcusoftnet / gist:2769065
Created May 22, 2012 13:30
ConnectionString
<connectionStrings>
<add
name="WebContext"
connectionString="DataSource=|DataDirectory|Teams.sdf"
providerName="System.Data.SqlServerCe.4.0"/>
</connectionStrings>
[TestFixture]
public class ExampleTestClass : FluentAutomation.API.FluentTest
{
[Test]
public void Test()
{
I.Open("http://www.google.com/");
}
}
[TestFixture]
public class ExampleTestClass : FluentAutomation.API.FluentTest
{
[Test]
public void Test()
{
I.Use(BrowserType.InternetExplorer);
I.Open("http://www.google.com/");
}
}
[TestFixture]
public class ExampleTestClass : FluentTest
{
public override void Setup()
{
ScreenshotOnAssertException = true;
ScreenshotPath = @"C:\TestResults\ExceptionImages\";
I.Use(BrowserType.InternetExplorer);
[TestFixture]
public class ExampleTestClass : FluentTest
{
public override void Setup()
{
ScreenshotOnAssertException = true;
ScreenshotPath = @"C:\TestResults\ExceptionImages\";
base.Setup();
}
public class BrowserAutomation : FluentTest
{
public override void Setup()
{
ScreenshotOnAssertException = true;
ScreenshotPath = @"C:\temp\";
base.Setup();
}
}
public class CreateTeamPageWrapper : PageWrapperBase
public CreateTeamPageWrapper() : base("/Teams/Create") { }
public class DBWrapper
{
private const string DatabasePath = @"c:\Dev\WebAutomationWithSpecFlow\Web\App_Data\Teams.sdf";
private static dynamic db = Database.Opener.OpenFile(DatabasePath);
public static void RemoveAllTeamsFromDatabase()
{
db.Teams.DeleteAll();
}
public static void EmptyAllTestData()
[Binding]
public class SpecFlowEvents
{
[AfterScenario]
public void AfterScenario() { DBWrapper.EmptyAllTestData(); }
[AfterTestRun]
public static void AfterTestRun() { PageWrapperBase.Browser.Finish(); }
}