public void CheckErrorMessageForInvalidCoupon() { yourOrderPage = new YourOrderPage(CmdDriver.Driver); extentReportUtils.createATestCase("Check error message for an invalid coupon"); extentReportUtils.addTestLog(Status.Info, "CheckErrorMessageForInvalidCoupon"); CmdDriver.NavigateTo("https://store.progress.com/configure-purchase?skuId=6127"); yourOrderPage.ClickAcceptAllCookies(); // Set coupon yourOrderPage.SetCoupon("TestDiscount20"); // Assert error message Assert.AreEqual("Coupon code is not valid.", yourOrderPage.GetCouponErrorMessageText()); }