Created
May 22, 2012 13:46
-
-
Save marcusoftnet/2769176 to your computer and use it in GitHub Desktop.
Fluent5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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