Пример #1
0
 def visit(self, course_id=None):  # pylint: disable=arguments-differ
     url = self.url(course_id)  # pylint: disable=not-callable
     try:
         self.browser.get(url)
     except (WebDriverException, socket.gaierror):
         raise PageLoadError(
             "Could not load page '{!r}' at URL '{}'".format(self, url))
Пример #2
0
    def visit(self):
        """
        Open the page containing this page object in the browser.

        Raises:
            PageLoadError: The page did not load successfully.

        Returns:
            PageObject
        """
        self.q(css=self.TAB_SELECTOR).first.click()
        try:
            return self.wait_for_page()
        except BrokenPromise:
            raise PageLoadError(u"Timed out waiting to load page '{!r}'".format(self))