code: def new_window(self, type_hint=None):
          
          value = self._driver.execute(Command.NEW_WINDOW, {'type': type_hint})['value']
          self._w3c_window(value['handle'])
docs: Switches to a new top-level browsing context.
  
          The type hint can be one of "tab" or "window". If not specified the
          browser will automatically select it.
  
          :Usage:
              ::
  
                  driver.switch_to.new_window('tab')