@And("^I click on View Basket button to empty the basket items$") public void I_click_on_View_Basket_button_to_empty_the_basket_items() throws Throwable { LOG.debug("I click on View Basket button to empty the basket items"); WC.wait(2); checkOutPage.I_navigate_to_TESCO_direct("home_page"); homePagePO = WC.getPageObject(HomePagePO.class); homePagePO.clickingOnViewBasketButton(); basketPagePO = WC.getPageObject(BasketPagePO.class); basketPagePO.clickingOnEmptyBasketButton(); }
@Then("^user should be displayed the following message$") public void user_should_be_displayed_the_following_message(DataTable table) throws Throwable { LOG.debug("user should be displayed the following message"); orderConfirmationPagePO = WC.getPageObject(OrderConfirmationPagePO.class); orderConfirmationPagePO.verifyYourOrderHasBeenConfirmedMessage(); orderConfirmationPagePO.ClickingOnMyAccount(); myAccountPO = WC.getPageObject(MyAccountPO.class); myAccountPO.clickingOnViewDirectOrdersbutton(); myOrdersPO = WC.getPageObject(MyOrdersPO.class); myOrdersPO.CancelOrder(); homePagePO = WC.getPageObject(HomePagePO.class); homePagePO.clickOnSignOutLink(); }
@When("^I enter my user details$") public void I_enter_my_user_details() throws Throwable { LOG.debug("I enter my user details"); aboutYouPagePO = WC.getPageObject(AboutYouPagePO.class); aboutYouPagePO.enterUserName("*****@*****.**"); aboutYouPagePO.enterPassword("Password2"); aboutYouPagePO.clickOnSignInButton(); }
@When("^I enter my bank card details to pay for the product$") public void I_enter_my_bank_card_details_to_pay_for_the_product() throws Throwable { LOG.debug("I enter my gift card details to pay for the product"); checkOutPagePO = WC.getPageObject(CheckOutPagePO.class); checkOutPagePO.payWithBankCard(); }
@When("^I update the Quantity in basket page$") public void I_update_the_Quantity_in_basket_page() throws Throwable { LOG.debug("I update the Quantity in basket page"); basketPagePO = WC.getPageObject(BasketPagePO.class); basketPagePO.updatingAndContinueTocheckout(); }
@When("^I click on PDP page Add to Basket button$") public void I_click_on_PDP_page_Add_to_Basket_button() throws Throwable { LOG.debug("I click on PDP page Add to Basket button"); searchResultsPO = WC.getPageObject(SearchResultsPO.class); searchResultsPO.clickOnPDPAddToBasketButton(); }