Skip to content

Commit a19f07a

Browse files
author
AutomatedTester
committed
move size and location to call getElementRect, will remove soon
1 parent 091b037 commit a19f07a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: py/selenium/webdriver/remote/webelement.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def location_once_scrolled_into_view(self):
342342
@property
343343
def size(self):
344344
"""The size of the element."""
345-
size = self._execute(Command.GET_ELEMENT_SIZE)['value']
345+
size = self._execute(Command.GET_ELEMENT_RECT)['value']
346346
new_size = {}
347347
new_size["height"] = size["height"]
348348
new_size["width"] = size["width"]
@@ -356,7 +356,7 @@ def value_of_css_property(self, property_name):
356356
@property
357357
def location(self):
358358
"""The location of the element in the renderable canvas."""
359-
old_loc = self._execute(Command.GET_ELEMENT_LOCATION)['value']
359+
old_loc = self._execute(Command.GET_ELEMENT_RECT)['value']
360360
new_loc = {"x": old_loc['x'],
361361
"y": old_loc['y']}
362362
return new_loc

0 commit comments

Comments
 (0)