-
-
Notifications
You must be signed in to change notification settings - Fork 755
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
Make findElement return MobileElement #162
Comments
I totally agree! Care to submit a Pull Request? |
I think the better way is to propose PR to Selenium project. I've got the great idea how to implement this. If this PR will be rejected then it is easy to override find methods here. So I think we should work on both these directions (I'm sorry for my English). |
PR proposed to Selenium: SeleniumHQ/selenium#327 |
Great! |
I thick this ticket should be closed |
I noticed in a presentation yesterday that they almost always casted to MobileElement. As MobileElement appears to be a sub-class of WebElement, you can modified the return type of findElement* to return MobileElement.
This would be backwards compatible.
If we want to get technical, we are dealing with covarient return types:
http://c2.com/cgi/wiki?CovariantReturnTypes
The text was updated successfully, but these errors were encountered: