Closed Bug 1571358 Opened 6 years ago Closed 2 years ago

Add an API to get/set network conditions

Categories

(Remote Protocol :: Marionette, enhancement, P3)

Version 3
enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: tarek, Unassigned)

Details

Selenium can leverage Chrome's network emulation feature on the fly via the setNetworkConditions and getNetworkConditions ChromeDriver APIs

see: https://github.com/SeleniumHQ/selenium/blob/master/py/selenium/webdriver/chromium/webdriver.py#L95-L127

In Gecko, we have a similar feature in our devtools, see:
https://searchfox.org/mozilla-central/source/devtools/client/shared/components/throttling -- that is based on netwerk's ThrottleQueue class.

So we could add a similar option in our tools to set gecko network conditions the same way.

related: bug 1548572

This implementation is not relying on the WebDriver standard, and might even use CDP to communicate that. It's very unlikely that we will have this with geckodriver. Maybe with the Remote Agent it would be doable.

If this setting is controlled via preferences (maybe network.http.throttle.*), why can't you just set those?

Flags: needinfo?(tarek)

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #2)

This implementation is not relying on the WebDriver standard, and might even use CDP to communicate that. It's very unlikely that we will have this with geckodriver. Maybe with the Remote Agent it would be doable.

This will, like Chrome's implementation, live in a browser specific namespace for webdriver. We can also add it to remote agent as well. This is to solve a specific problem that Tarek has.

Flags: needinfo?(tarek)
Severity: normal → S3
Product: Testing → Remote Protocol

We will get to this eventually via the WebDriver BiDi implementation, but it won't happen for Marionette.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.