Last active
August 29, 2015 13:56
-
-
Save stirno/9080874 to your computer and use it in GitHub Desktop.
Expect cookie exists with value
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
[TestClass] | |
public class AcceptanceTest1 : FluentAutomation.FluentTest<OpenQA.Selenium.IWebDriver> | |
{ | |
public AcceptanceTest1() | |
{ | |
FluentAutomation.SeleniumWebDriver.Bootstrap(FluentAutomation.SeleniumWebDriver.Browser.Chrome); | |
} | |
[TestMethod] | |
public void TestMethod1() | |
{ | |
I.Expect.True(() => this.Provider.Manage().Cookies.GetCookieNamed("CrazyCookie").Value == "CookieValue"); | |
} | |
} |
This is absolute gold - but please can you either post links to these examples from your blog? I spent too long searching :-) Thanks for the hard work on this product though! It is fantastic being able to write fluent test cases.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notice the use of the new (in 2.3) FluentTest type. This provides access to the underlying provider. Then you can use the .True/.False expects to work with the values.