Ejemplo n.º 1
0
 def click_login(self):
     link = self.find_element_by_link_text('Login')
     def href_exists(_):
         return bool(link.get_attribute('href'))
     self.wait().until(href_exists)
     link.click()
     return pageobjects.LoginPage(self._tester, continue_page=QueryApp)
Ejemplo n.º 2
0
    def login(self, email):
        last_window_handle = self._tester.driver.current_window_handle
        self.switch_to_login_window(last_window_handle)

        login_page = pageobjects.LoginPage(self._tester)
        login_page.login(email, post_wait=False)

        self._tester.driver.switch_to_window(last_window_handle)
Ejemplo n.º 3
0
    def load(
            self, static_server_base_url, course_builder_base_url,
            redirect=False):

        config = {}
        config['cbHost'] = course_builder_base_url
        if redirect:
            config['redirect'] = True

        self.get('%s/%s#%s' % (
            static_server_base_url, self.URL, transforms.dumps(config)))

        if redirect:
            return pageobjects.LoginPage(
                self._tester, continue_page=EnsureSessionExamplePage)
        else:
            return self
Ejemplo n.º 4
0
 def _course_list_login_page(self):
     return pageobjects.LoginPage(
         self, continue_page=pageobjects.CoursesListPage).load(
             suite.TestBase.INTEGRATION_SERVER_BASE_URL,
             suffix=self.COURSE_LIST_LOGIN_URL)
Ejemplo n.º 5
0
 def click_start_button(self):
     self._get_start_button().click()
     return pageobjects.LoginPage(
         self._tester, continue_page=EnsureSessionExamplePage)