Skip to content

Commit

Permalink
Correct URI for window-related session commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jugglinmike committed Feb 7, 2017
1 parent efbdbb1 commit 26f9940
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 26f9940

Please sign in to comment.