BenHall / xUnitBrowserAttribute
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (1)
- Wiki (1)
- Graphs
-
Branch:
master
commit 3b67eb338a6d2934b5ee46110656378ac658c4ea
tree 67082e69a824a87fda986750c243c9cea4fd7f7a
parent bb396bc97f243c829e9e8fd139ffe53cac6d1724
tree 67082e69a824a87fda986750c243c9cea4fd7f7a
parent bb396bc97f243c829e9e8fd139ffe53cac6d1724
| name | age | message | |
|---|---|---|---|
| |
Libs/ | Tue Aug 18 19:15:38 -0700 2009 | |
| |
README | Thu Jun 25 09:54:02 -0700 2009 | |
| |
xUnitBrowserAttribute.sln | Thu Jun 25 09:51:51 -0700 2009 | |
| |
xUnitBrowserAttribute/ | Tue Aug 18 19:31:17 -0700 2009 |
README
Browser attribute for xUnit and WatiN.
The aim is to make your cross browser tests more reusable by moving the logic of creating the browser object into an
attribute.
You can define multiple Browser attributes, each one which start an instance of the browser and execute the test.
For example, the code below will start three different tests - one for each browser which can pass\fail indepently to
provide you with accurate results.
public class Example
{
[Theory]
[Browser("IE")]
[Browser("FireFox")]
[Browser("Chrome")]
public void Should_Click_Search_On_Google_And_Return_Results_For_AspNet(Browser browser)
{
browser.GoTo("http://www.google.co.uk");
browser.TextField(Find.ByName("q")).Value = "asp.net";
browser.Button(Find.ByName("btnG")).Click();
Assert.True(browser.ContainsText("The Official Microsoft ASP.NET Site"));
}
}
NOTE: This will only work with the WatiN library.