diff --git a/py/selenium/webdriver/remote/webelement.py b/py/selenium/webdriver/remote/webelement.py index 4bd0f23250214..df25ea11cd0bd 100644 --- a/py/selenium/webdriver/remote/webelement.py +++ b/py/selenium/webdriver/remote/webelement.py @@ -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