Skip to content

Commit

Permalink
Fix regression in webdriver tests
Browse files Browse the repository at this point in the history
A large number of tests in webdriver directory are currently failing,
due to a change in the parameters of Find.css method by PR web-platform-tests#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.
  • Loading branch information
JohnChen0 authored and natechapin committed Aug 23, 2019
1 parent cfc9814 commit 6232022
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/webdriver/webdriver/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tools/wptrunner/wptrunner/executors/executorwebdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6232022

Please sign in to comment.