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

4 comments on commit a19f07a

@sevaseva
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"will remove soon" what? size and location endpoints from selenium remote end implementation(s)? (I'm just curious)

@AutomatedTester
Copy link
Member

@AutomatedTester AutomatedTester commented on a19f07a Apr 15, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barancev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1
This command is implemented in FirefoxDriver only at the moment. So this commit broke all the other drivers. Let's start from the remote end.

@lukeis-sfdc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted in 5308198

Please sign in to comment.