navigator.webdriver active flag has to be bound to the WebDriver (Marionette, BiDi) and CDP session lifetime
Categories
(Remote Protocol :: Agent, defect, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
Details
(Whiteboard: [webdriver:backlog])
As per the WebDriver spec the active state of navigator.webdriver
needs to be bound to the active Session. If there is no session the property has to return false
.
https://w3c.github.io/webdriver/#webidl-592684117
The webdriver-active flag is set to true when the user agent is under remote control. It is initially false.
When closing the session:
Set the webdriver-active flag to false.
Via bug 1632821 I recently updated the WebIDL definition to no longer depend on the marionette.enabled
preference but when Marionette is actually running. That means we have to restrict it even more at some point.
So far no-one complained, as such we will work on it when needed.
Reporter | ||
Comment 1•3 years ago
|
||
Lets do it when we have the new Session module.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 2•2 years ago
|
||
With all the dependencies fixed we could now check what's required to actually get the navigator.webdriver
property bound to an active WebDriver and CDP session.
Going the easiest way we could just add a new property on the Remote Agent parent process class which checks all the supported protocols if active sessions exist. This information could then be forwarded similarly to running
to the Remote Agent content process class.
The downside doing it exactly this way might trigger a performance issue. Right now navigator.webdriver
is marked as a cached constant. That means it's read once, which then no longer holds. Having to retrieve the current value each time requires the instantiation of the content process class for the Marionette and Remote Agent implementation, which are both a JSM. Getting instances of JSM services/interfaces via XPConnect from C++/Rust is way slower as when having a C++/Rust component.
We may try the above steps first, and do extensive performance testing. If issues arise we could refactor the content processes classes of both components into a C++ or Rust component. Both of them should see code changes very rarely and as such shouldn't require a full build.
We should discuss the priority and strategy in a triage meeting.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 3•2 years ago
|
||
As discussed we will not work on this particular feature in the foreseeable future. It's less likely that users are in such a situation and might only happen when using an eg. daily Firefox profile with remote protocols enabled - which is something that we do not encourage to do at all.
As such lets keep in the backlog but post-pone any work.
Description
•