本文整理汇总了C#中DriverScope类的典型用法代码示例。如果您正苦于以下问题:C# DriverScope类的具体用法?C# DriverScope怎么用?C# DriverScope使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DriverScope类属于命名空间,在下文中一共展示了DriverScope类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetSelectScope
private static DriverScope GetSelectScope(string locator)
{
var select = new DriverScope(DefaultSessionConfiguration,
new SelectFinder(Driver, locator, Root, DefaultOptions), Driver,
null, null, null, DisambiguationStrategy);
return @select;
}
示例2: Can_fill_in_a_text_input_within_an_iframe
public void Can_fill_in_a_text_input_within_an_iframe()
{
var iframeOne = new DriverScope(new SessionConfiguration(), new FrameFinder(Driver, "I am iframe one", Root), Driver, null, null, null);
Driver.Set(Driver.FindField("text input in iframe", iframeOne), "filled in");
Assert.That(Driver.FindField("text input in iframe", iframeOne).Value, Is.EqualTo("filled in"));
}
示例3: Can_scope_inside_an_iframe
public void Can_scope_inside_an_iframe()
{
var iframeOne = new DriverScope(new SessionConfiguration(), new FrameFinder(Driver, "I am iframe one", Root), Driver, null, null, null);
var iframeForm = new DriverScope(new SessionConfiguration(), new CssFinder(Driver, "form", iframeOne), Driver, null, null, null);
Driver.FindField("text input in iframe", iframeForm);
}
示例4: Gets_location_for_correct_window_scope
public void Gets_location_for_correct_window_scope()
{
Driver.Click(Link("Open pop up window"));
var popUp = new DriverScope(DefaultSessionConfiguration, new WindowFinder(Driver, "Pop Up Window", Root, DefaultOptions), Driver, null, null, null, DisambiguationStrategy);
Assert.That(Driver.Location(popUp).AbsoluteUri, Is.StringEnding("src/Coypu.Drivers.Tests/html/popup.htm"));
}
示例5: Finds_clear_scope_back_to_the_whole_window
public void Finds_clear_scope_back_to_the_whole_window()
{
var iframeOne = new DriverScope(new SessionConfiguration(), new FrameFinder(Driver, "I am iframe one", Root), Driver,null,null,null);
Driver.FindButton("scoped button", iframeOne).Id.should_be("iframe1ButtonId");
Driver.FindButton("scoped button", Root).Id.should_be("scope1ButtonId");
}
示例6: Can_fill_in_a_text_input_within_an_iframe
public void Can_fill_in_a_text_input_within_an_iframe()
{
var iframeOne = new DriverScope(DefaultSessionConfiguration, new FrameFinder(Driver, "I am iframe one", Root, DefaultOptions), Driver, null, null, null, DisambiguationStrategy);
Driver.Set(FindField("text input in iframe", iframeOne), "filled in");
Assert.That(FindField("text input in iframe", iframeOne).Value, Is.EqualTo("filled in"));
}
示例7: ElementFinder
protected ElementFinder(Driver driver, string locator, DriverScope scope, Options options)
{
Driver = driver;
this.locator = locator;
Scope = scope;
this.options = options;
}
示例8: Finds_clear_scope_back_to_the_whole_window
public void Finds_clear_scope_back_to_the_whole_window()
{
var iframeOne = new DriverScope(DefaultSessionConfiguration, new FrameFinder(Driver, "I am iframe one", Root, DefaultOptions), Driver,null,null,null,DisambiguationStrategy);
Button("scoped button", iframeOne, DefaultOptions).Id.should_be("iframe1ButtonId");
Button("scoped button", Root, Options.PreferExact).Id.should_be("scope1ButtonId");
}
示例9: Gets_location_for_correct_window_scope
public void Gets_location_for_correct_window_scope()
{
Driver.Click(Driver.FindLink("Open pop up window", Root));
var popUp = new DriverScope(new SessionConfiguration(), new WindowFinder(Driver, "Pop Up Window", Root), Driver, null, null, null);
Assert.That(Driver.Location(popUp).AbsoluteUri, Is.StringEnding("src/Coypu.Drivers.Tests/html/popup.htm"));
}
示例10: Select
internal Select(Driver driver, DriverScope scope, string locator, string option, Options timingOptions)
: base(driver, timingOptions)
{
this.scope = scope;
this.locator = locator;
this.option = option;
}
示例11: FillIn
internal FillIn(Driver driver, DriverScope scope, string locator, string value, Options options)
: base(driver,options)
{
this.locator = locator;
this.scope = scope;
this.value = value;
}
示例12: WaitThenClick
internal WaitThenClick(Driver driver, DriverScope scope, Options options, Waiter waiter, ElementFinder elementFinder, DisambiguationStrategy disambiguationStrategy)
: base(driver, scope, options)
{
waitBeforeClick = options.WaitBeforeClick;
this.waiter = waiter;
this.elementFinder = elementFinder;
this.disambiguationStrategy = disambiguationStrategy;
}
示例13: Finds_elements_among_multiple_scopes
public void Finds_elements_among_multiple_scopes()
{
var iframeOne = new DriverScope(new SessionConfiguration(), new FrameFinder(Driver, "I am iframe one", Root), Driver,null,null,null);
var iframeTwo = new DriverScope(new SessionConfiguration(), new FrameFinder(Driver, "I am iframe two", Root), Driver,null,null,null);
Driver.FindButton("scoped button", iframeOne).Id.should_be("iframe1ButtonId");
Driver.FindButton("scoped button", iframeTwo).Id.should_be("iframe2ButtonId");
}
示例14: Errors_on_window_closed
public void Errors_on_window_closed()
{
Driver.Click(Driver.FindLink("Open pop up window", Root));
var popUp = new DriverScope(new SessionConfiguration(), new WindowFinder(Driver, "Pop Up Window", Root), Driver, null, null, null);
Driver.ExecuteScript("self.close();", popUp);
Assert.Throws<MissingWindowException>(() => Driver.FindWindow("Open pop up window", Root));
}
示例15: Finds_elements_among_multiple_scopes
private static void Finds_elements_among_multiple_scopes(ElementFinder elementFinder1, ElementFinder elementFinder2)
{
var iframeOne = new DriverScope(DefaultSessionConfiguration, elementFinder1, Driver, null, null, null, DisambiguationStrategy);
var iframeTwo = new DriverScope(DefaultSessionConfiguration, elementFinder2, Driver, null, null, null, DisambiguationStrategy);
Button("scoped button", iframeOne, DefaultOptions).Id.should_be("iframe1ButtonId");
Button("scoped button", iframeTwo, DefaultOptions).Id.should_be("iframe2ButtonId");
}