New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 723900 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Feature



Sign in to add a comment

Introduce NavigatorWebDriver interface

Reported by shek...@gmail.com, May 17 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
Webdriver specification (https://www.w3.org/TR/webdriver/#interface) defines `webdriver` property on navigator object to indicate if UA is controlled by automation. 

WebKit already does that (https://github.com/WebKit/webkit/commit/ce5ef8d5e72fb49cf2a0b72e2a5a8fb551c57f5a) so it'd be nice to see the support in Chromium as well.

What is the expected behavior?

What went wrong?
navigator.webdriver should return `true` if browser is headless or is controlled by automation. 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 58.0.3029.110  Channel: stable
OS Version: OS X 10.11.6
Flash Version:
 
Cc: rbasuvula@chromium.org
Labels: Needs-Feedback
@Reporter: Thanks for filing the issue. Could you please provide us any sample html/JS file to triage the issue from test team end.

Thank You!
Components: Blink
Labels: -Needs-Feedback OS-Linux OS-Windows
Components: -Blink Tests>WebDriver

Comment 4 by ajha@chromium.org, Jun 7 2017

Labels: -Type-Bug TE-NeedsTriageHelp Type-Feature

Comment 5 by shek...@gmail.com, Jun 7 2017

FYI, I am working on this, There is a blocked intent to Ship for this feature at https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/6GysDZCWwB8/rXbGoRohBgAJ. 

And CL review at https://codereview.chromium.org/2886943007/, which will definitely change as spec is getting changed.

Comment 6 by tapted@chromium.org, Jun 16 2017

Cc: shek...@gmail.com
Status: Started (was: Unconfirmed)
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/54c54afcd1d3b790a15de0fc70caeff5350da5bb

commit 54c54afcd1d3b790a15de0fc70caeff5350da5bb
Author: Sergey Shekyan <shekyan@gmail.com>
Date: Wed Oct 04 21:27:19 2017

Introduce NavigatorAutomationInformation interface

Introduce NavigatorAutomationInformation interface
that indicates if navigator is controlled by automation.
It is guarded by RuntimeEnabled and exists only if AutomationControlled feature is set.
https://w3c.github.io/webdriver/webdriver-spec.html#dom-navigatorautomationinformation

Bug:  723900 
Change-Id: If54295456a24fe8c86958c037263939ba3e44cb7
Reviewed-on: https://chromium-review.googlesource.com/665978
Commit-Queue: Sergey Shekyan <shekyan@gmail.com>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506524}
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/chrome/browser/infobars/infobar_service.cc
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/chrome/browser/password_manager/chrome_password_manager_client.cc
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/chrome/common/chrome_switches.cc
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/chrome/common/chrome_switches.h
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/content/child/runtime_features.cc
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/content/public/common/content_switches.cc
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/content/public/common/content_switches.h
[add] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/LayoutTests/external/wpt/webdriver/interface/interface.html
[add] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/LayoutTests/navigator_webdriver/navigator_webdriver.html
[add] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/LayoutTests/navigator_webdriver/navigator_webdriver_enabled.html
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/Source/core/frame/Navigator.h
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/Source/core/frame/Navigator.idl
[add] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/Source/core/frame/NavigatorAutomationInformation.idl
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/Source/platform/runtime_enabled_features.json5
[modify] https://crrev.com/54c54afcd1d3b790a15de0fc70caeff5350da5bb/third_party/WebKit/public/platform/WebRuntimeFeatures.h

Comment 8 by shek...@gmail.com, Jan 19 2018

This can be closed as fixed.
Status: Fixed (was: Started)

Sign in to add a comment