[英]does anyone have an example code for using cglib MulticastDelegate to do something like C# events?
[英]Does anyone have an example of using MSpec with Fluent Automation in C#?
當我調用I.Open("http://google.com");
時,我無法使用“ I”變量I.Open("http://google.com");
因為它是從靜態上下文訪問的。 最壞的情況是,我總是可以將MSTest用於硒測試,將MSpec用於所有其他測試。
[Tags("Easy","Web")]
[Subject("Verify we can reach google.com.")]
public class ViewGoogleTest: FluentTest
{
IActionSyntaxProvider result;
Establish context = () =>
{
SeleniumWebDriver.Bootstrap(SeleniumWebDriver.Browser.Chrome);
};
Because of = () =>
{
result = I.Open("http://google.com");
};
It should_display_the_page = () => result.Find("#SomeId");
}
我找到了一個例子。 基本上,您創建的是Selenium實例,而不是Fluent Automation文檔中顯示的默認繼承。
https://github.com/agross/mspec-samples/blob/master/WebSpecs/LoginApp.Selenium.Specs/LoginSpecs.cs
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.