Skip to content

Commit

Permalink
Round the X, Y of the element location
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Jun 15, 2016
1 parent 48cc1a9 commit 502cef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/selenium/webdriver/remote/webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ def location(self):
old_loc = self._execute(Command.GET_ELEMENT_RECT)
else:
old_loc = self._execute(Command.GET_ELEMENT_LOCATION)['value']
new_loc = {"x": old_loc['x'],
"y": old_loc['y']}
new_loc = {"x": round(old_loc['x']),
"y": round(old_loc['y'])}
return new_loc

@property
Expand Down

0 comments on commit 502cef2

Please sign in to comment.