Example #1
0
        public async Task NavigateToAccountDetail(Account account)
        {
            var viewModel = new AccountDetailViewModel(account);

            var page = new AccountDetailPage(viewModel);

            await Application.Current.MainPage.Navigation.PushAsync(page);
        }
        public void VerifyColourOfOrder()
        {
            //Landing Home Page for Automation Practice
            HomePage pgHome = new HomePage();

            //Clicking on SignIn button on HomePage returns SignIn Page
            MainSignInPage pgSignInMain = pgHome.clickSignin();

            //Signing in with username and password returns Account Details page
            AccountDetailPage pgAccountDetail = pgSignInMain.SignIn(strEmailAddress, strPassword);

            //Clicking on Order History Returns Order History Page
            OrderHistoryPage pgOrderHistory = pgAccountDetail.clickOrderHistory();

            //Returning the colour
            string strItemColour = pgOrderHistory.GettingColourofOrder();

            Reporting.AssertTrue("Red", strItemColour, "VerifyColourOfOrder", "Colour is Red");
        }
        public void AddCommentToOrder()
        {
            //Landing Home Page for Automation Practice
            HomePage pgHome = new HomePage();

            //Clicking on SignIn button on HomePage returns SignIn Page
            MainSignInPage pgSignInMain = pgHome.clickSignin();

            //Signing in with username and password returns Account Details page
            AccountDetailPage pgAccountDetail = pgSignInMain.SignIn(strEmailAddress, strPassword);

            //Clicking on Order History Returns Order History Page
            OrderHistoryPage pgOrderHistory = pgAccountDetail.clickOrderHistory();

            //Selecting most recent order and adding a message
            string strLatestMessage = pgOrderHistory.AddMessage("Please update the order");

            Reporting.AssertTrue("Please update the order", strLatestMessage, "AddCommentToOrder", "Verify comments are updated");
        }