def METHOD_NAME(self, path: str, timeout: float = 3.0) -> None:
    """Try to open the page until the server is ready or we time out.
    If the server is not yet running, start it.
    """
    if self.server_thread is None:
        self.start_server()
    deadline = time.time() + timeout
    while True:
        try:
            self.selenium.get(f'http://localhost:{self.PORT}{path}')
            self.selenium.find_element(By.XPATH, '//body')  # ensure page and JS are loaded
            break
        except Exception as e:
            if time.time() > deadline:
                raise
            time.sleep(0.1)
            if not self.server_thread.is_alive():
                raise RuntimeError('The NiceGUI server has stopped running') from e