Skip to content

Commit

Permalink
py,rb: Comparing remote web element for equality does not require a r…
Browse files Browse the repository at this point in the history
…emote command, comparing IDs is enough
  • Loading branch information
barancev committed May 27, 2015
1 parent 419a902 commit 2976ad5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 1 addition & 4 deletions py/selenium/webdriver/remote/webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,7 @@ def id(self):
return self._id

def __eq__(self, element):
if self._id == element.id:
return True
else:
return self._execute(Command.ELEMENT_EQUALS, {'other': element.id})['value']
return self._id == element.id

# Private Methods
def _execute(self, command, params=None):
Expand Down
6 changes: 1 addition & 5 deletions rb/lib/selenium/webdriver/remote/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -582,11 +582,7 @@ def getElementValueOfCssProperty(element, prop)
end

def elementEquals(element, other)
if element.ref == other.ref
true
else
execute :elementEquals, :id => element.ref, :other => other.ref
end
element.ref == other.ref
end

#
Expand Down

0 comments on commit 2976ad5

Please sign in to comment.