-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
WebElement API flexibility: cannot extend findElements(By) #934
Comments
See pull request #863 |
I like it. |
…reads. Also-by: Achim Kraus <achim.kraus@bosch-si.com>
Closing this issue since all the discussion was done in the PR, in addition, the PR was not merged but its purpose was achieved in the end through the implementation of generics in the Java bindings for Appium. |
I want to extend WebElement in my library but the signature for
findElements(By)
is causing me trouble:Compiling a class,
ExtendedWebElement
, that implementsWebElement
and overridesfindElements(By)
using a different return type, i.e.List<ExtendedWebElement> findElements(By by);
, produces the following error message:[ERROR] return type java.util.List<com.example.selenium.ExtendedWebElement> is not compatible with java.util.List<org.openqa.selenium.WebElement>
Can we change the signature to use a bounded wildcard to increase API flexibility?
If so then it will be much more flexible (e.g. extensible). Thank you.
The text was updated successfully, but these errors were encountered: