public void BookATrip() { HomePageActions.SelectFromCity(); HomePageActions.SelectToCity("Colombo"); HomePageActions.SelectDepartDate(); HomePageActions.SelectReturnDate(); }
public void Test_01_SomeTest() { var HomePageActions = new HomePageActions(); HomePageActions.GetPage(); HomePageActions.PerformSearch(SEARCH_ITEM); var SearchResultsPageActions = new SearchResultsPageActions(); var itemsList = SearchResultsPageActions.GetSearchItems(); Assert.IsTrue(itemsList.All(i => i.ToLower().Contains(SEARCH_ITEM))); }
public void Test() { var extentTest = _extentReportUtils.StartTest(_report, "Checkout an item"); var homePageActions = new HomePageActions(_webDriver); var searchResultsActions = new SearchResultsActions(_webDriver); var itemDetailsActions = new ItemDetailsActions(_webDriver); var cartActions = new YourCartActions(_webDriver); var checkoutInfoActions = new CheckoutInformationActions(_webDriver); var shippingActions = new ShippingActions(_webDriver); var paymentActions = new PaymentAndReviewActions(_webDriver); var confirmationActions = new ConfirmationActions(_webDriver); var pathToTheScreenshot = _screenshotUtils.GetPathForScreenshot(); var pathToTheScreenshot1 = _screenshotUtils.GetPathForScreenshot(); homePageActions.NavigateToHomePage(); homePageActions.SearchForAnItem("fluke"); searchResultsActions.SelectTheSecondItem(); itemDetailsActions.AddToCart(); itemDetailsActions.ViewCart(pathToTheScreenshot); _ = extentTest.Log(AventStack.ExtentReports.Status.Info, "Modal screenshot captured"). AddScreenCaptureFromPath(pathToTheScreenshot); cartActions.EnterQuantity("2"); cartActions.Checkout(); checkoutInfoActions.FillOutDefaultInformation(); checkoutInfoActions.ContinueToShippingMethod(); shippingActions.SelectThreeDayShipping(); shippingActions.AddSignatureRequired(); shippingActions.ContinueToPaymentMethod(); paymentActions.EnterPaymentInformation(); paymentActions.SubmitOrder(); var confirmationNumber = confirmationActions.GetOrderNumber(); _screenshotUtils.TakeAScreenshot(_webDriver, pathToTheScreenshot1); Assert.That(confirmationNumber, Is.Not.Null); _ = extentTest.Log(AventStack.ExtentReports.Status.Info, $"Order Number: {confirmationNumber}"). AddScreenCaptureFromPath(pathToTheScreenshot1); _ = extentTest.Pass("Successfully checked out an item"); }
public void GivenISelectCategory(string categoryName) { HomePageActions page = new HomePageActions(); page.SelectCategory(categoryName); }
public void WhenIPerformSearchOfTheProduct(string searchCriteria) { HomePageActions page = new HomePageActions(); page.PerformSearch(searchCriteria); }
public void GivenIAmOnThePage(string pageName) { HomePageActions page = new HomePageActions(); page.GetPage(); }