selenium: [πŸ› Bug]: Status endpoint

What happened?

Someone pointed out that I incorrectly removed status endpoint from Python (still supported https://w3c.github.io/webdriver/#status). I removed it because no method was calling it. Need to make sure all the languages have methods that can call this endpoint. Don’t have time to investigate now and don’t want to forget.

How can we reproduce the issue?

driver.status

Relevant log output

none

Operating System

n/a

Selenium version

latest

What are the browser(s) and version(s) where you see this issue?

n/a

What are the browser driver(s) and version(s) where you see this issue?

n/a

Are you using Selenium Grid?

n/a

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 20 (18 by maintainers)

Commits related to this issue

Most upvoted comments

We don’t need to do anything right now, just saying that if we are implementing something, it might make sense to ensure it works both locally and remotely, even when the use case is more obvious for remote.

@titusfortner What you suggested is possible because of the way the WebDriver interface and RemoteWebDriver class are designed in the Java bindings. Since all driver classes inherit RemoteWebDriver, they have access to the static status endpoint as long as the service URL is provided.

ChromeDriverService service = new ChromeDriverService.Builder()
      .usingAnyFreePort()
      .build();

service.start();

Status status = ChromeDriver.status(service.getUrl());

if (status.isReady()) {
   ChromeDriver driver = new ChromeDriver(service);
   driver.get("http://google.com");
   driver.quit();
}

service.stop();

I will try and add a test to showcase this. However, C# implementation is slightly different and the PR changes only allow status API to be accessed from RemoteWebDriver. Once, we reach a consensus about how we want to access it, it can be easily updated.