Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Selenium2Library/keywords/_browsermanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def set_window_size(self, width, height):
return self._current_browser().set_window_size(width, height)

def get_window_position(self):
"""Returns current window position as `x` then `y`.
"""Returns current window position as `x` then `y` (relative to the left and top of the screen).

Example:
| ${x} | ${y}= | Get Window Position |
Expand All @@ -269,13 +269,13 @@ def get_window_position(self):
return position['x'], position['y']

def set_window_position(self, x, y):
"""Sets the position `x` and `y` of the current window to the specified values.
"""Sets the position x and y of the current window (relative to the left and top of the screen) to the specified values.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because x and y are arguments, could you write it like this: x and y


Example:
| Set Window Size | ${1000} | ${0} |
| ${x} | ${y}= | Get Window Position |
| Should Be Equal | ${x} | ${1000} |
| Should Be Equal | ${y} | ${0} |
| Set Window Position | ${8} | ${10} |
| ${x} | ${y}= | Get Window Position |
| Should Be Equal | ${x} | ${8} |
| Should Be Equal | ${y} | ${10} |
"""
return self._current_browser().set_window_position(x, y)

Expand Down