Skip to content

Instantly share code, notes, and snippets.

@marcusoftnet
Created May 22, 2012 13:46
Show Gist options
  • Select an option

  • Save marcusoftnet/2769176 to your computer and use it in GitHub Desktop.

Select an option

Save marcusoftnet/2769176 to your computer and use it in GitHub Desktop.
Fluent5
public class BrowserAutomation : FluentTest
{
public override void Setup()
{
ScreenshotOnAssertException = true;
ScreenshotPath = @"C:\temp\";
base.Setup();
}
}
public class PageWrapperBase
{
private readonly Uri pageURL;
public PageWrapperBase(string pagePath)
{
var rootUrl = new Uri(ConfigurationManager.AppSettings["baseUrl"]);
pageURL = new Uri(rootUrl, pagePath);
}
public void Visit()
{
Browser.Open(pageURL);
}
private static BrowserAutomation _instance;
public static CommandManager Browser
{
get
{
if (_instance == null)
{
_instance = new BrowserAutomation();
_instance.I.Use(BrowserType.Firefox);
}
return _instance.I;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment