Bug 1391691 - Fix undefined variable error with client.Session#position(). r=automatedtester draft
authorAndreas Tolfsen <ato@sny.no>
Fri, 18 Aug 2017 18:34:44 +0100
changeset 650443 6edb0445ac89d0202a4ef037b0cd38af226c6507
parent 650442 4698c8f0ea09d4db20bc8dbe0d5c8b4bc30297d8
child 650444 c3110bb53ca2dc795e0e6756525435ba2ea61a8e
push id75393
push userbmo:ato@sny.no
push dateTue, 22 Aug 2017 11:04:53 +0000
reviewersautomatedtester
bugs1391691
milestone57.0a1
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
testing/web-platform/tests/tools/webdriver/webdriver/client.py
--- 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"]