Bug 1391691 - Fix undefined variable error with client.Session#position(). r=automatedtester
The x and y variables are not defined but needs to be extracted from
new_position.
MozReview-Commit-ID: Ds8cPlufjUa
--- a/testing/web-platform/tests/tools/webdriver/webdriver/client.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/client.py
@@ -263,17 +263,17 @@ class Window(object):
"""Gets the window position as a tuple of `(x, y)`."""
rect = self.rect
return (rect["x"], rect["y"])
@position.setter
@command
def position(self, new_position):
"""Set window position by passing a tuple of `(x, y)`."""
- data = x, y
+ x, y = new_position
body = {"x": x, "y": y}
self.session.send_session_command("POST", "window/rect", body)
@property
@command
def state(self):
return self.rect["state"]