From a19f07aec61d491fa4839c002d65d03347fc21e8 Mon Sep 17 00:00:00 2001 From: AutomatedTester Date: Fri, 6 Mar 2015 16:55:26 +0000 Subject: [PATCH] move size and location to call getElementRect, will remove soon --- py/selenium/webdriver/remote/webelement.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/selenium/webdriver/remote/webelement.py b/py/selenium/webdriver/remote/webelement.py index 43659ca7b1d25..85b94ff2d3c64 100755 --- a/py/selenium/webdriver/remote/webelement.py +++ b/py/selenium/webdriver/remote/webelement.py @@ -342,7 +342,7 @@ def location_once_scrolled_into_view(self): @property def size(self): """The size of the element.""" - size = self._execute(Command.GET_ELEMENT_SIZE)['value'] + size = self._execute(Command.GET_ELEMENT_RECT)['value'] new_size = {} new_size["height"] = size["height"] new_size["width"] = size["width"] @@ -356,7 +356,7 @@ def value_of_css_property(self, property_name): @property def location(self): """The location of the element in the renderable canvas.""" - old_loc = self._execute(Command.GET_ELEMENT_LOCATION)['value'] + old_loc = self._execute(Command.GET_ELEMENT_RECT)['value'] new_loc = {"x": old_loc['x'], "y": old_loc['y']} return new_loc