code: def switch_to_window(self, window_name=None, title=None, url=None):
          
          if window_name:
              self.switch_to.window(window_name)
              return
  
          if url:
              url = self.get_url(path=url)
  
          for window_handle in self.window_handles:
              self.switch_to.window(window_handle)
              if title and self.title == title:
                  return
              if url and self.current_url == url:
                  return
          raise selenium_exc.NoSuchWindowException('Window (title=%s, url=%s) not found.' % (title, url))
docs: WebDriver implements switching to other window only by it's name. With
          wrapper there is also option to switch by title of window or URL. URL
          can be also relative path.