Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use weaker interface HasIdentity instead of class RemoteWebElement #432

Merged
merged 1 commit into from
Jul 1, 2016
Merged

Use weaker interface HasIdentity instead of class RemoteWebElement #432

merged 1 commit into from
Jul 1, 2016

Conversation

asolntsev
Copy link
Contributor

Change list

  • io.appium.java_client.TouchAction
  • io.appium.java_client.pagefactory_tests.widgets.ios.simple.IOSMovie

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

In java_client code, WebElement parameter is casted to RemoteWebElement.
It makes hard to create proxy object for WebElement (like Selenide and probably some other frameworks do).

Actually only method getId() is used. This method is declared in interface HasIdentity.

This pull request changes few places where WebElement is casted to RemoteWebElement so that it's not casted to HasIdentity instead of RemoteWebElement.

Old code:

new ActionParameter("press", (RemoteWebElement) el);

new code:

new ActionParameter("press", (HasIdentity) el);

@TikhomirovSergey
Copy link
Contributor

@asolntsev Thank you. I'm merging...

@TikhomirovSergey TikhomirovSergey merged commit d0c21fa into appium:master Jul 1, 2016
@asolntsev
Copy link
Contributor Author

Wow, that was fast!

@asolntsev asolntsev deleted the remove_excessive_remote_web_element_usages branch July 1, 2016 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants