original_docstring: 
          Switches to the given page in the browser.
  
          :param page: the page to switch to
          :raise CrawlerNotRunningError: if the crawler is not running
          :raise NoSuchPageError: if the page does not exist
          
docstring: Switches to the given page in the browser.
docstring_tokens: Switches to the given page in the browser .
code: def switch_to_page(self, page: BrowserPage) -> None:
          """
          Switches to the given page in the browser.
  
          :param page: the page to switch to
          :raise CrawlerNotRunningError: if the crawler is not running
          :raise NoSuchPageError: if the page does not exist
          """
  
          self._check_if_crawler_running()
  
          try:
              self._page = syncer.sync(self._browser.pages())[page.index]
          except IndexError:
              raise NoSuchPageError(page.index)
  
          self._page_index = page.index
          syncer.sync(self._page.bringToFront())
          self._add_page_listeners(self._page)
code_tokens: def switch_to_page ( self , page : BrowserPage ) -> None : self . _check_if_crawler_running ( ) try : self . _page = syncer . sync ( self . _browser . pages ( ) ) [ page . index ] except IndexError : raise NoSuchPageError ( page . index ) self . _page_index = page . index syncer . sync ( self . _page . bringToFront ( ) ) self . _add_page_listeners ( self . _page )
short_docstring: Switches to the given page in the browser.
short_docstring_tokens: Switches to the given page in the browser .
comment: """
          Switches to the given page in the browser.
  
          :param page: the page to switch to
          :raise CrawlerNotRunningError: if the crawler is not running
          :raise NoSuchPageError: if the page does not exist
          """