navigator.webdriver active flag has to be bound to the WebDriver (Marionette, BiDi) 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•4 years ago
|
||
Lets do it when we have the new Session module.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 2•3 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•3 years ago
|
Reporter | ||
Comment 3•3 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.
(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #0)
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 returnfalse
.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.
Nope, it MUST be a setting the user can decide whether they want or not. There are cases in which i make bots that have to be undetectable by google.
Comment 5•5 months ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE
.
For more information, please visit BugBot documentation.
Reporter | ||
Comment 6•4 months ago
|
||
We are going to remove our CDP support soon, so this only applies to our WebDriver classic and BiDi implementations.
Description
•