Repository navigation
feat(runner): tap, swipe and fill actions for mobile runners (AGE-4855) #1638
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 all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f4ea8de
feat(runner): tap, swipe and fill actions for mobile runners in runne…
erzhtor 864a784
fix(runner): say which actions each runner family refuses in act help…
erzhtor 65c95eb
test(runner): fill with empty text clears the field (AGE-4855)
erzhtor 3cabf60
build(runner): pin @qawolf/api-contracts 0.73.0 (AGE-4855)
erzhtor 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@qawolf/cli": minor | ||
| --- | ||
|
|
||
| `qawolf runner act` has mobile actions of its own: `tap` (at `--x`/`--y` or on a `--selector`), `swipe` (`--from x,y --to x,y`, optional `--duration-ms`), and `fill` (replaces the value of the `--selector` field with `--text`). `click` and `drag` still tap and swipe on a mobile runner, but are deprecated there. A browser runner refuses the mobile actions with `action-not-supported-on-browser`. Pins `@qawolf/api-contracts` 0.73.0. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| export const actExamples = ` | ||
| Examples: | ||
| $ qawolf runner act click --button left --x 480 --y 260 | ||
| $ qawolf runner act type --text "hello@example.com" | ||
| $ qawolf runner act keypress --keys Control a | ||
| $ qawolf runner act navigate --url https://example.com | ||
| $ qawolf runner act drag --path '[{"x":10,"y":20},{"x":80,"y":90}]' | ||
| $ qawolf runner act click --button left --x 480 --y 260 --screenshot step-4.jpg | ||
| $ echo '{"type":"click","button":"left","x":1,"y":2}' | qawolf runner act - | ||
| $ echo '{"type":"click","button":"left","x":1,"y":2}' | qawolf runner act - --screenshot - > step-5.jpg | ||
|
|
||
| Mobile: | ||
| $ qawolf runner act tap --x 540 --y 1200 | ||
| $ qawolf runner act tap --selector '//*[@content-desc="Continue"]' | ||
| $ qawolf runner act fill --selector 'name == "Postal code"' --strategy ios-predicate --text 94107 | ||
| $ qawolf runner act swipe --from 540,1600 --to 540,600 --duration-ms 1500`; |
Oops, something went wrong.
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.
runner actionsrejectstap,swipeandfill, so it no longer takes the same actions asrunner act. I think we should update the description inactions.register.tsand regenerate this table and the help snapshots.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.
TIL about
runner actions, thanks. Fixed the other way around in #1642 to make runner actions to also accept the mobile actions too. Will land once api-contracts 0.74.0 publishes, e.g. https://github.com/qawolf/platform/pull/34509