Skip to content

Commit

Permalink
Merge pull request #6 from jugglinmike/session-corrections
Browse files Browse the repository at this point in the history
Correct URI for window-related session commands
  • Loading branch information
andreastt authored Feb 7, 2017
2 parents efbdbb1 + 26f9940 commit a5c7254
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webdriver/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,26 +172,26 @@ def __init__(self, session):
@property
@command
def size(self):
resp = self.session.send_command("GET", "window/size")
resp = self.session.send_command("GET", "window/rect")
return (resp["width"], resp["height"])

@size.setter
@command
def size(self, (width, height)):
body = {"width": width, "height": height}
self.session.send_command("POST", "window/size", body)
self.session.send_command("POST", "window/rect", body)

@property
@command
def position(self):
resp = self.session.send_command("GET", "window/position")
resp = self.session.send_command("GET", "window/rect")
return (resp["x"], resp["y"])

@position.setter
@command
def position(self, (x, y)):
body = {"x": x, "y": y}
self.session.send_command("POST", "window/position", body)
self.session.send_command("POST", "window/rect", body)

@property
@command
Expand Down

0 comments on commit a5c7254

Please sign in to comment.