-
-
Notifications
You must be signed in to change notification settings - Fork 769
feat: Add locator types supported by flutter integration driver #2201
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b04522a
feat: Add locator types supported by flutter integration driver
sudharsan-selvaraj d6314d9
Implement custom flutter drivers for android and ios
sudharsan-selvaraj cfd4ced
checkStyle fixes
sudharsan-selvaraj 7ae569c
Minor tweaks
sudharsan-selvaraj d4b7f63
improvements
sudharsan-selvaraj f7a6e43
Remove driver implementation
sudharsan-selvaraj 01eb52c
Address review comments
sudharsan-selvaraj 8ebd140
Remove toJson implementation
sudharsan-selvaraj ad017d1
Styling fixes
sudharsan-selvaraj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure this method is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently flutter driver supports custom commands like scrollTillVisble, waitForVisible, waitForVisible etc, which accepts raw locator info(By) as arguments. So users can directly pass the locator info by calling toJson() method instead of constructing the JsonMap manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can observe that Remotable.Parameters class already contains
toJson
method. It's private though. Lets add it to the list in SeleniumHQ/selenium#13949 and leave a TODO there.Also consider using Map.of() factory instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also provide an example of any of the above calls where toJson method may be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One such example is using
flutter: scrollTillVisible
method.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably make sense to create FlutterIosDriver and FlutterAndroidDriver inherited from iOSDriver and AndroidDriver, so the above extensions may be implemented as first-class methods, e.g.
flutter. scrollTillVisible(AppiumBy.flutterKey("login_button"))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We initially had a similar idea. After reviewing the implementation, we found that the logic is consistent for both iOS and Android drivers, so we decided to maintain this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sudharsan-selvaraj Agree we wanted to make it consistent but nothing is stopping us implementing the initial approach if everyone is fine. It gets easier to implement the tests.
cc: @mykola-mokhnach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saikrishna321 @mykola-mokhnach That sounds good! Let's proceed by creating separate Flutter-specific driver classes to abstract the underlying commands. I'll prepare a patch with the changes and tag for the review.