Skip to content

Commit

Permalink
[py] Make forward backward compatible with OSS (#6355)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirPodolian authored and lmtierney committed Sep 12, 2018
1 parent d03ab49 commit 5571298
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion py/selenium/webdriver/remote/webelement.py
Expand Up @@ -539,7 +539,12 @@ def location(self):
@property
def rect(self):
"""A dictionary with the size and location of the element."""
return self._execute(Command.GET_ELEMENT_RECT)['value']
if self._w3c:
return self._execute(Command.GET_ELEMENT_RECT)['value']
else:
rect = self.size.copy()
rect.update(self.location)
return rect

@property
def screenshot_as_base64(self):
Expand Down

0 comments on commit 5571298

Please sign in to comment.