當前位置: 首頁>>代碼示例>>C#>>正文


C# IE.Page方法代碼示例

本文整理匯總了C#中WatiN.Core.IE.Page方法的典型用法代碼示例。如果您正苦於以下問題:C# IE.Page方法的具體用法?C# IE.Page怎麽用?C# IE.Page使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WatiN.Core.IE的用法示例。


在下文中一共展示了IE.Page方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Cannot_find_unidentified_child_text_field_by_ancestor_regex

 public void Cannot_find_unidentified_child_text_field_by_ancestor_regex()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsFalse(page.UnidentifiedChildTextFieldByRegexNotFound.Exists);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:8,代碼來源:FindByAncestorTests.cs

示例2: Page_With_An_Action

        public void Page_With_An_Action()
        {
            using (var browser = new IE("http://www.google.com")) {
                browser.Page<GoogleSearchPage>().SearchFor("Robby");

                Assert.IsTrue(browser.ContainsText("Robby"));
            }
        }
開發者ID:robbytarigan,項目名稱:HelloWorldWatin,代碼行數:8,代碼來源:UnitTest1.cs

示例3: Can_find_firstName_by_id_selector

 public void Can_find_firstName_by_id_selector()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsTrue(page.FirstNameBySelector.Exists);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:8,代碼來源:FindByCssSelectorTests.cs

示例4: Cannot_find_first_name_by_generic_attribute_text_regex_when_there_is_no_match

 public void Cannot_find_first_name_by_generic_attribute_text_regex_when_there_is_no_match()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsFalse(page.FirstNameNotFoundByGenericAttributeValueRegex.Exists);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:8,代碼來源:FindByGenericAttributeTests.cs

示例5: Can_find_first_name_by_rel_text_regex

 public void Can_find_first_name_by_rel_text_regex()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsTrue(page.FirstNameByLabelTextRegex.Exists);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:8,代碼來源:FindByRelTests.cs

示例6: Cannot_find_firstName_by_id_selector_when_wrong

 public void Cannot_find_firstName_by_id_selector_when_wrong()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsFalse(page.FirstNameByIncorrectSelector.Exists);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:8,代碼來源:FindByCssSelectorTests.cs

示例7: Can_find_last_name_textbox_near_label_text

 public void Can_find_last_name_textbox_near_label_text()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsTrue(page.LastNameTextBox.Exists);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:8,代碼來源:FindNearTests.cs

示例8: Cannot_find_first_name_by_rel_text_regex_when_there_is_no_match

 public void Cannot_find_first_name_by_rel_text_regex_when_there_is_no_match()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsFalse(page.FirstNameNotFoundByLabelTextRegex.Exists);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:8,代碼來源:FindByRelTests.cs

示例9: Can_find_first_name_by_generic_attribute_text_regex

 public void Can_find_first_name_by_generic_attribute_text_regex()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsTrue(page.FirstNameByGenericAttributeValueRegex.Exists);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:8,代碼來源:FindByGenericAttributeTests.cs

示例10: Can_find_unidentified_child_text_field_by_ancestor_regex

 public void Can_find_unidentified_child_text_field_by_ancestor_regex()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsTrue(page.UnidentifiedChildTextFieldByRegex.Exists);
         Assert.AreEqual("child", page.UnidentifiedChildTextFieldByRegex.Value);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:9,代碼來源:FindByAncestorTests.cs

示例11: Can_find_firstName_by_children_selector

 public void Can_find_firstName_by_children_selector()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsTrue(page.FirstNameLabelBySelector.Exists);
         Assert.AreEqual("First Name:", page.FirstNameLabelBySelector.Text);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:9,代碼來源:FindByCssSelectorTests.cs

示例12: Can_find_first_name_textbox_near_index_header

 public void Can_find_first_name_textbox_near_index_header()
 {
     using (var browser = new IE(url))
     {
         var page = browser.Page<HomeIndexPage>();
         Assert.IsTrue(page.LastNameTextBoxNotFound.Exists);
         Assert.AreEqual("firstName", page.LastNameTextBoxNotFound.IdOrName);
     }
 }
開發者ID:pvanhouten,項目名稱:WatiN.FindExtensions,代碼行數:9,代碼來源:FindNearTests.cs

示例13: Sample_app_started_in_IISExpress

 public void Sample_app_started_in_IISExpress()
 {
     using (IWebServer server = WebServerFactory.CreateWebServer())
     using (Browser browser = new IE(server.RootUrl))
     {
         browser.WaitForComplete();
         IndexPage page = browser.Page<IndexPage>();
         Assert.Contains("Please run the WatiN test", page.Message.Text);
     }
 }
開發者ID:glombard,項目名稱:WebTestHelper,代碼行數:10,代碼來源:SampleTest.cs

示例14: ShouldShowCorrectApplicantDetailsOnSuccessPage

        public void ShouldShowCorrectApplicantDetailsOnSuccessPage()
        {
            using (var browser =
                new IE(UiAutomationSettings.ApplyPageUrl))
            {
                var applyPage = browser.Page<ApplyForCreditCardPage>();

                applyPage.ApplyForCreditCard(name: "Jason",
                                age: "30",
                                airlineNumber: "A1234567");

                Assert.That(browser.Url.Contains("ApplicationAccepted.aspx"));

                var acceptedPage = browser.Page<AcceptedPage>();

                Assert.That(acceptedPage.Document.Url.Contains("ApplicationAccepted.aspx"));

                Assert.That(acceptedPage.Name, Is.EqualTo("Jason"));
            }
        }
開發者ID:stephenosrajan,項目名稱:PSTestingEndToEnd,代碼行數:20,代碼來源:CreditCardApplicationTests.cs

示例15: Search_for_watin_on_google_using_page_class

        public void Search_for_watin_on_google_using_page_class()
        {
            using (var browser = new IE("http://www.google.com"))
            {
                var searchPage = browser.Page<GoogleSearchPage>();
                searchPage.SearchCriteria.TypeText("WatiN");
                searchPage.SearchButton.Click();

                Assert.IsTrue(browser.ContainsText("WatiN"));
            }
        }
開發者ID:exaphaser,項目名稱:WatiN,代碼行數:11,代碼來源:GoogleTests.cs


注:本文中的WatiN.Core.IE.Page方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。