From b1de69960e8183bf779ca7aca8ea2800e04a7891 Mon Sep 17 00:00:00 2001 From: John Chen Date: Mon, 22 Jul 2019 10:22:22 +0000 Subject: [PATCH] Bug 1565150 [wpt PR 17754] - Fix regression in webdriver tests, a=testonly Automatic update from web-platform-tests Fix regression in webdriver tests A large number of tests in webdriver directory are currently failing, due to a change in the parameters of Find.css method by PR #17260, which broke any tests that still supply the old parameters. This commit changes the parameter order and uses default parameter value to make the parameter list compatible with the old one. -- wpt-commits: d528abff035d6596f68f21a9510ee1c5b58a1e48 wpt-pr: 17754 --- testing/web-platform/tests/tools/webdriver/webdriver/client.py | 2 +- .../tools/wptrunner/wptrunner/executors/executorwebdriver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/client.py b/testing/web-platform/tests/tools/webdriver/webdriver/client.py index 781eabdbc4dd4..0bddd7b137383 100644 --- a/testing/web-platform/tests/tools/webdriver/webdriver/client.py +++ b/testing/web-platform/tests/tools/webdriver/webdriver/client.py @@ -313,7 +313,7 @@ def __init__(self, session): self.session = session @command - def css(self, element_selector, frame, all=True): + def css(self, element_selector, all=True, frame="window"): if (frame != "window"): self.session.switch_frame(frame) elements = self._find_element("css selector", element_selector, all) diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index ce7691c4d565a..37f735d575116 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -143,7 +143,7 @@ def elements_by_selector(self, selector): return self.webdriver.find.css(selector) def elements_by_selector_and_frame(self, element_selector, frame): - return self.webdriver.find.css(element_selector, frame) + return self.webdriver.find.css(element_selector, frame=frame) class WebDriverClickProtocolPart(ClickProtocolPart):