Bug 1391691 - Add wdclient documentation for window manipulation. r=automatedtester draft
authorAndreas Tolfsen <ato@sny.no>
Fri, 18 Aug 2017 18:33:52 +0100
changeset 650442 4698c8f0ea09d4db20bc8dbe0d5c8b4bc30297d8
parent 650441 a1efaf7cf2a5c068b62c60453b1f8814d34b043b
child 650443 6edb0445ac89d0202a4ef037b0cd38af226c6507
push id75393
push userbmo:ato@sny.no
push dateTue, 22 Aug 2017 11:04:53 +0000
reviewersautomatedtester
bugs1391691
milestone57.0a1
Bug 1391691 - Add wdclient documentation for window manipulation. r=automatedtester MozReview-Commit-ID: 758QOhUfJzs
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
@@ -240,35 +240,39 @@ class Window(object):
     @property
     @command
     def rect(self):
         return self.session.send_session_command("GET", "window/rect")
 
     @property
     @command
     def size(self):
+        """Gets the window size as a tuple of `(width, height)`."""
         rect = self.rect
         return (rect["width"], rect["height"])
 
     @size.setter
     @command
-    def size(self, data):
-        width, height = data
+    def size(self, new_size):
+        """Set window size by passing a tuple of `(width, height)`."""
+        width, height = new_size
         body = {"width": width, "height": height}
         self.session.send_session_command("POST", "window/rect", body)
 
     @property
     @command
     def position(self):
+        """Gets the window position as a tuple of `(x, y)`."""
         rect = self.rect
         return (rect["x"], rect["y"])
 
     @position.setter
     @command
-    def position(self, data):
+    def position(self, new_position):
+        """Set window position by passing a tuple of `(x, y)`."""
         data = x, y
         body = {"x": x, "y": y}
         self.session.send_session_command("POST", "window/rect", body)
 
     @property
     @command
     def state(self):
         return self.rect["state"]