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); } }
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")); } }
public void Can_find_firstName_by_id_selector() { using (var browser = new IE(url)) { var page = browser.Page<HomeIndexPage>(); Assert.IsTrue(page.FirstNameBySelector.Exists); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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")); } }
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")); } }
public void ShouldShowValidationErrors() { using (var browser = new IE(UiAutomationSettings.ApplyPageUrl)) { var applyPage = browser.Page<ApplyForCreditCardPage>(); applyPage.ApplyForCreditCard(name: "Jason", age: "30", airlineNumber: "BadNumber"); Assert.That(browser.Text.Contains("Airline membership number is invalid")); } }
public void Purge(IE ie) { var trash = ie.Page<Trash>(); ie.GoTo(trash.Url); ie.WaitForComplete(); if (ie.Elements.Exists("btnPurgeAll")) { trash.PurgeAll.Click(); } }
public void Purge(IE ie) { var trash = ie.Page<Trash>(); ie.GoTo(trash.Url); ie.WaitForComplete(); trash.PurgeAll.Click(); }