本文整理匯總了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);
}
}
示例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"));
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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"));
}
}
示例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"));
}
}