コード例 #1
0
 public void WhenIChooseToLogOut()
 {
     _DashboardPage.BottomMenuOptions.More.Click();
     _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.LogOut, 3);
     _DashboardPage.ScrollDownTo(_DashboardPage.MoreMenuOptions.LogOut.Locator);
     _DashboardPage.MoreMenuOptions.LogOut.Click();
     _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.YesLogOut, 3);
     _DashboardPage.MoreMenuOptions.YesLogOut.Click();
 }
コード例 #2
0
        public void WhenISelectTheToobarItemOf(string toolbarItem)
        {
            switch (toolbarItem.ToLower())
            {
            case "medicine chest":
                _DashboardPage.WaitForElementPresent(_DashboardPage.BottomMenuOptions.MedChest, 5);
                _DashboardPage.BottomMenuOptions.MedChest.Click();
                break;

            case "price medicine":
                _DashboardPage.WaitForElementPresent(_DashboardPage.BottomMenuOptions.PriceMeds, 5);
                _DashboardPage.BottomMenuOptions.PriceMeds.Click();
                break;

            case "food index":
                _DashboardPage.WaitForElementPresent(_DashboardPage.BottomMenuOptions.FoodIndex, 5);
                _DashboardPage.BottomMenuOptions.FoodIndex.Click();
                break;

            case "more":
                _DashboardPage.WaitForElementPresent(_DashboardPage.BottomMenuOptions.More, 5);
                _DashboardPage.BottomMenuOptions.More.Click();
                break;

            case "dashboard":
                _DashboardPage.WaitForElementPresent(_DashboardPage.BottomMenuOptions.Dashboard, 5);
                _DashboardPage.BottomMenuOptions.Dashboard.Click();
                break;

            default:
                Assert.Fail(toolbarItem + ": Toolbar Item is not supported at the moment.");
                break;
            }
        }
コード例 #3
0
        public void WhenIChooseMenuOption(string menuOption)
        {
            switch (menuOption.ToLower())
            {
            case "edit profile":
                _DashboardPage.WaitForElementPresent(_ManageYourProfilePage.Header, 3);
                _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.ManageAccount, 3);
                _DashboardPage.MoreMenuOptions.ManageAccount.Click();
                break;

            case "change password":
                _DashboardPage.WaitForElementPresent(_ManageYourProfilePage.Header, 3);
                _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.ChangePassword, 3);
                _DashboardPage.MoreMenuOptions.ChangePassword.Click();
                break;

            case "apply invite code":
                _DashboardPage.WaitForElementPresent(_ManageYourProfilePage.Header, 3);
                _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.ApplyInviteCode, 3);
                _DashboardPage.MoreMenuOptions.ApplyInviteCode.Click();
                break;

            case "ask a pharmacist":
                _DashboardPage.WaitForElementPresent(_ManageYourProfilePage.Header, 3);
                _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.AskPharmacist, 3);
                _DashboardPage.MoreMenuOptions.AskPharmacist.Click();
                break;

            case "about us":
                _DashboardPage.WaitForElementPresent(_ManageYourProfilePage.Header, 3);
                _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.AboutUs, 3);
                _DashboardPage.MoreMenuOptions.AboutUs.Click();
                if (_DashboardPage.MoreMenuOptions.AboutUsTwo.Displayed() && _ManageYourProfilePage.Header.Displayed())
                {
                    _DashboardPage.MoreMenuOptions.AboutUsTwo.Click();
                }
                break;

            case "faqs":
                _DashboardPage.WaitForElementPresent(_ManageYourProfilePage.Header, 3);
                _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.FAQs, 3);
                _DashboardPage.MoreMenuOptions.FAQs.Click();
                break;

            case "contact us":
                _DashboardPage.WaitForElementPresent(_ManageYourProfilePage.Header, 3);
                _DashboardPage.WaitForElementPresent(_DashboardPage.MoreMenuOptions.ContactUs, 3);
                _DashboardPage.MoreMenuOptions.ContactUs.Click();
                break;

            default:
                Assert.Fail(menuOption + ": menu option is not supported at the moment.");
                break;
            }
        }
コード例 #4
0
 public void ThenIShouldBeNavigatedToTheHomePage()
 {
     _DashboardPage.WaitForElementPresent(_DashboardPage.SavingsCard, 30);
     Assert.IsTrue(_DashboardPage.SavingsCard.Displayed(), "not on home page, or missing savings card");
 }