Skip to content

Commit 502cef2

Browse files
Round the X, Y of the element location
1 parent 48cc1a9 commit 502cef2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py/selenium/webdriver/remote/webelement.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ def location(self):
368368
old_loc = self._execute(Command.GET_ELEMENT_RECT)
369369
else:
370370
old_loc = self._execute(Command.GET_ELEMENT_LOCATION)['value']
371-
new_loc = {"x": old_loc['x'],
372-
"y": old_loc['y']}
371+
new_loc = {"x": round(old_loc['x']),
372+
"y": round(old_loc['y'])}
373373
return new_loc
374374

375375
@property

0 commit comments

Comments
 (0)