Skip to content

The "equals" method of MobileElement/RemoteWebElement is not consistent for native apps. #227

Open
@TikhomirovSergey

Description

@TikhomirovSergey
WebElement e1 = driver.findElement(By. some constant locator);
WebElement e2 = driver.findElement(By. some constant locator);
e1.equals(e2);// is always "false"

for native apps. It happens because used automation tools always returns different ID's each time when client tries to find (the same) element. @bootstraponline told me this. This issue were found a month ago when I was working on features for .Net client. There were more foreground things... But now I can't keep calm anymore :)

There are two ideas:

  • the first is to perform comparison only on the client side. There would be large scripts for each supported platform.
  • the second is to perform comparison on the server side. We could ask other team to implement a server side command that would return "true" when elements are equal and "false" otherwise. But at this case the client has to be adapted to the new command as well.

@Jonahss
What would you choose or advise?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions