Skip to content

Commit

Permalink
move size and location to call getElementRect, will remove soon
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Apr 14, 2015
1 parent 091b037 commit a19f07a
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 @@ -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"]
Expand All @@ -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
Expand Down

0 comments on commit a19f07a

Please sign in to comment.