Example #1
0
 def wait_until_debit_card_tracker_displayed(self):
     """ Wait until the Debit Card Tracker is displayed """
     self.wait_until_dashboard_displayed()
     tracker = BaseElement(self.driver, locators.DEBIT_CARD_TRACKER)
     # Sometimes the tracker doesn't display right away, added a refresh to cover this case
     if tracker.not_displayed():
         self.driver.refresh()
     tracker.wait_until_displayed()
Example #2
0
 def return_to_dashboard(self):
     """ Navigate back to the customer dashboard """
     location = BaseElement(self.driver, locators.LOCATION_TEXT)
     # Begin navigation if we are not already at the dashboard
     if location.get_text() != 'Account Summary':
         drawer_button = BaseElement(self.driver, locators.DRAWER_BUTTON)
         if drawer_button.not_displayed():
             # If the drawer button isn't displayed, then we need to click the back-button to make it appear
             back_button = BaseElement(self.driver,
                                       locators.NAVIGATE_UP_BUTTON)
             if back_button.displayed(5):
                 back_button.click()
         drawer_button.click()
         BaseElement(self.driver, locators.SUMMARY_BUTTON).click()
     location.wait_until_displayed()