w3c / w3c/webdriver

Define behaviour of commands in terms of unexpected navigations, content process crashes etc.

Open
#1,308 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

Currently, various implementations have pretty useless behaviour in face of some errors (e.g., both GeckoDriver and ChromeDriver seem to return null for execute script if the content process crashes). We should better define what implementations should do, and probably define something distinguishable from potentially correct behaviour (given null from that and null from return null; are the same!).

There's a few cases here:

  • An implementation like ChromeDriver where the WebDriver end point communicates over another IPC channel to the browser itself (over CDP in that case), where there are multiple possible failure modes:

    • the CDP connection being closed (and being unable to reconnect)
    • the browser stopping responding to CDP requests (and being unable to reconnect and remake the request, if it's idempotent!)
    • the browser responding to CDP requests but the content process not responding to the browser ("Aw, snap!")
  • An implementation where the browser is itself the end point (I'm not sure anyone does this any more?):

    • the end point stops responding because the browser itself has crashed
    • the content process isn't responding
  • An intermediary node losing its connection to the end point.

These are all general connectivity problems where the local end can still communicate with the first remote end, so we should define something here, as we still have a working WebDriver connection.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the WebDriver specification and the failure modes listed here: closed or unresponsive CDP connections, crashed browsers or content processes, and disconnected intermediary nodes. Done means the specification defines distinguishable behavior for these connectivity failures without conflating it with valid command results.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.