当前位置: 首页>>代码示例>>C#>>正文


C# DriverScope类代码示例

本文整理汇总了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;
 }
开发者ID:SaintGimp,项目名称:coypu,代码行数:7,代码来源:When_setting_fields.cs

示例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"));
        }
开发者ID:MatteS75,项目名称:coypu,代码行数:7,代码来源:When_using_iframes_as_scope.cs

示例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);
        }
开发者ID:MatteS75,项目名称:coypu,代码行数:7,代码来源:When_using_iframes_as_scope.cs

示例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"));
        }
开发者ID:SaintGimp,项目名称:coypu,代码行数:7,代码来源:When_inspecting_location.cs

示例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");
        }
开发者ID:MatteS75,项目名称:coypu,代码行数:7,代码来源:When_using_iframes_as_scope.cs

示例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"));
 }
开发者ID:SaintGimp,项目名称:coypu,代码行数:7,代码来源:When_using_iframes_as_scope.cs

示例7: ElementFinder

 protected ElementFinder(Driver driver, string locator, DriverScope scope, Options options)
 {
     Driver = driver;
     this.locator = locator;
     Scope = scope;
     this.options = options;
 }
开发者ID:JamieBenson,项目名称:coypu,代码行数:7,代码来源:ElementFinder.cs

示例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");
        }
开发者ID:SaintGimp,项目名称:coypu,代码行数:7,代码来源:When_using_iframes_as_scope.cs

示例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"));
        }
开发者ID:MatteS75,项目名称:coypu,代码行数:7,代码来源:When_inspecting_location.cs

示例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;
 }
开发者ID:AidenMontgomery,项目名称:coypu,代码行数:7,代码来源:Select.cs

示例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;
 }
开发者ID:MatteS75,项目名称:coypu,代码行数:7,代码来源:FillIn.cs

示例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;
 }
开发者ID:JamieBenson,项目名称:coypu,代码行数:8,代码来源:WaitThenClick.cs

示例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");
        }
开发者ID:AidenMontgomery,项目名称:coypu,代码行数:8,代码来源:When_using_iframes_as_scope.cs

示例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));
        }
开发者ID:AidenMontgomery,项目名称:coypu,代码行数:8,代码来源:When_finding_windows.cs

示例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");
        }
开发者ID:SaintGimp,项目名称:coypu,代码行数:8,代码来源:When_using_iframes_as_scope.cs


注:本文中的DriverScope类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。