w3c / w3c/webdriver

Need a way to enable / disable networking from webdriver

Open
#354 2 comments 3 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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25179

James Graham:

The new generation of web apps are expected to continue to function when networking is not available for whatever reason. Obviously this is particularly important on mobile devices to close the gap between native apps and web apps.

At present it isn't possible to test the behaviour of an app when it is offline, or the transition between online and offline or vice-versa. This substantially decreases the utility of WebDriver for testing contemporary web applications. Neither is it possible to write testsuites for the features underlying offline support (AppCache, Service Worker), substantially increasing the chance of buggy or non-interoperable implementations.

The most obvious way to provide this would be to expose an API to webdriver that would allow disabling "content" networking i.e. from the point of view of the webpage it would look like the browser was offline, but privileged code (in particular webdriver itself) would still be able to perform network operations.

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 reading the linked W3C bug and the existing WebDriver specification/API surface. Determine how an offline browser state should be exposed while preserving privileged WebDriver networking, then define the required behavior and interoperability tests before implementation.

Written by the indexing model from the issue text.

Assessment

Domain
api, testing
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.