-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
C-javaJava BindingsJava Bindings
Description
I want to extend WebElement in my library but the signature for findElements(By)
is causing me trouble:
List<WebElement> findElements(By by);
Compiling a class, ExtendedWebElement
, that implements WebElement
and overrides findElements(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?
List<? extends WebElement> findElements(By by);
If so then it will be much more flexible (e.g. extensible). Thank you.
Metadata
Metadata
Assignees
Labels
C-javaJava BindingsJava Bindings