mach not prompting to download chrome driver

RESOLVED FIXED in Firefox 64

Status

defect
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: marcosc, Assigned: jgraham)

Tracking

Version 3
mozilla64
Points:
---

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(2 attachments)

Running the following returns an error about ChromeWebDriver not being installed. 

So, going to:

https://developer.mozilla.org/en-US/docs/Mozilla/QA/web-platform-tests#Running_tests_in_other_browsers

It states:
"for Chrome the mach command will prompt to download this, "

But it's not prompting for me. 

What I tried to do:

$ ./mach wpt --product chrome /payment-request/onpaymentmenthodchange-attribute.https.html
 0:00.10 INFO Skipping manifest download because existing file is recent
 0:00.10 INFO Updating manifest /Users/mcaceres/dev/gecko/obj-ff-dbg/_tests/web-platform/meta/MANIFEST.json
 0:09.83 INFO Updating manifest /Users/mcaceres/dev/gecko/obj-ff-dbg/_tests/web-platform/mozilla/meta/MANIFEST.json
Error running mach:

    ['wpt', '--product', 'chrome', '/payment-request/onpaymentmenthodchange-attribute.https.html']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

AttributeError: 'module' object has no attribute 'ChromeWebDriver'

  File "/Users/mcaceres/dev/gecko/testing/web-platform/mach_commands.py", line 354, in run_wpt
    return self.run_web_platform_tests(**params)
  File "/Users/mcaceres/dev/gecko/testing/web-platform/mach_commands.py", line 347, in run_web_platform_tests
    return wpt_runner.run(logger, **params)
  File "/Users/mcaceres/dev/gecko/testing/web-platform/mach_commands_base.py", line 36, in run
    kwargs = self.setup.kwargs_wptrun(kwargs)
  File "/Users/mcaceres/dev/gecko/testing/web-platform/mach_commands.py", line 120, in kwargs_wptrun
    from tools.wpt import run
  File "/Users/mcaceres/dev/gecko/build/mach_bootstrap.py", line 349, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
  File "/Users/mcaceres/dev/gecko/testing/web-platform/tests/tools/wpt/run.py", line 298, in <module>
    class ChromeWebDriver(Chrome):
  File "/Users/mcaceres/dev/gecko/testing/web-platform/tests/tools/wpt/run.py", line 300, in ChromeWebDriver
    browser_cls = browser.ChromeWebDriver
These came from a combination of botched merges and cases where we
fixed up a commit for upstream CI failures and didn't apply the changes
correctly.
We need to pass in the extra kwargs that wpt run understands but
wptrunner does not. Ideally we could switch to using the run frontend
always and allow users to actually supply these kwargs, although that
might have some unwanted behaviour, and is a larger change. For now
this gets things working again.

Depends on D9081
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/048da8a3c951
Fix some differences with upstream in wpt tooling, r=automatedtester
https://hg.mozilla.org/integration/autoland/rev/2025f3b4871b
Fixup using non-firefox browsers via mach wpt, r=automatedtester
https://hg.mozilla.org/mozilla-central/rev/048da8a3c951
https://hg.mozilla.org/mozilla-central/rev/2025f3b4871b
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Just following up, I get a little further along now, but still getting an error... 

(the outdated pip is `./obj-ff-dbg/_virtualenvs/init/bin/pip` - but I guess it doesn't matter)

```
$ ./mach wpt --product chrome testing/web-platform/tests/payment-request/payment-request-abort-method.https.html
 0:00.13 INFO Skipping manifest download because existing file is recent
 0:00.13 INFO Updating manifest /Users/mcaceres/dev/gecko/obj-ff-dbg/_tests/web-platform/meta/MANIFEST.json
 0:09.74 INFO Updating manifest /Users/mcaceres/dev/gecko/obj-ff-dbg/_tests/web-platform/mozilla/meta/MANIFEST.json
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Using webdriver binary /Users/mcaceres/dev/gecko/obj-ff-dbg/_virtualenvs/init/bin/chromedriver
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Error running mach:

    ['wpt', '--product', 'chrome', 'testing/web-platform/tests/payment-request/payment-request-abort-method.https.html']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

OSError: [Errno 2] No such file or directory

  File "/Users/mcaceres/dev/gecko/testing/web-platform/mach_commands.py", line 367, in run_wpt
    return self.run_web_platform_tests(**params)
  File "/Users/mcaceres/dev/gecko/testing/web-platform/mach_commands.py", line 360, in run_web_platform_tests
    return wpt_runner.run(logger, **params)
  File "/Users/mcaceres/dev/gecko/testing/web-platform/mach_commands_base.py", line 36, in run
    kwargs = self.setup.kwargs_wptrun(kwargs)
  File "/Users/mcaceres/dev/gecko/testing/web-platform/mach_commands.py", line 136, in kwargs_wptrun
    **kwargs)
  File "/Users/mcaceres/dev/gecko/testing/web-platform/tests/tools/wpt/run.py", line 498, in setup_wptrunner
    kwargs['browser_version'] = setup_cls.browser.version(kwargs.get("binary"))
  File "/Users/mcaceres/dev/gecko/testing/web-platform/tests/tools/wpt/browser.py", line 464, in version
    version_string = call(binary, "--version").strip()
  File "/Users/mcaceres/dev/gecko/testing/web-platform/tests/tools/wpt/utils.py", line 44, in call
    return subprocess.check_output(args)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 216, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception

```

The test file is definitely there tho. Any ideas?
It looks like it's not finding Chrome on your system. Try passing --binary path/to/chrome (the actual executable not the .app). We should improve the error message in this case.
Assignee: nobody → james
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/13852 for changes under testing/web-platform/tests
Can't merge web-platform-tests PR due to failing upstream checks:
Github PR https://github.com/web-platform-tests/wpt/pull/13852
* Taskcluster (pull_request) (https://tools.taskcluster.net/task-group-inspector/#/BtvxEpdaSpWSqsq3Lw4Ptg)
Upstream PR was closed without merging
Upstream PR was closed without merging
You need to log in before you can comment on or make changes to this bug.