Uh oh!
There was an error while loading. Please reload this page.
Ability to use types which extend WebElement. findElement/findElements methods - #327
Closed
TikhomirovSergey wants to merge 1 commit into
Closed
Ability to use types which extend WebElement. findElement/findElements methods#327TikhomirovSergey wants to merge 1 commit into
TikhomirovSergey wants to merge 1 commit into
Conversation
bootstraponline
commented
Mar 7, 2015
Contributor
👍 |
1 similar comment
Jonahss
commented
Mar 9, 2015
Contributor
👍 |
barancev
commented
Mar 10, 2015
Member
Is it worth to add new tests for this feature? |
TikhomirovSergey
commented
Mar 10, 2015
ContributorAuthor
@barancev In order to demonstrate that the new feature is ok today I can add two new tests. They will check these cases RemoteWebElementr = driver.findElement(someBy);and List<RemoteWebElement> rList = driver.findElements(someBy); |
jleyba
commented
Mar 10, 2015
Contributor
I'm opposed to this change as it weakens the contract on |
TikhomirovSergey
commented
Mar 10, 2015
ContributorAuthor
@jleyba Thanks for the remark. I will try to find the way to avoid the problem that you have mentioned |
TikhomirovSergey
commented
Mar 13, 2015
ContributorAuthor
Ok. I can't find the correct way to resolve the possible problem mentioned by @jleyba. So I am closing this PR. I will propose something better next time. Thanks for the attention. |
andreastt
commented
Mar 14, 2015
Member
Thanks for the work you put into this, @TikhomirovSergey. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are a lot of projects that extends Selenium Webdriver. And the returning of WebElement is not comfortable because there is the necessity to cast the result each time.
Here is the sample from Appium:
In order to avoid this inconvenience these things are proposed:
It is backward compatible with current projects and it gives some more points:
then there is no need to cast the result each time.