This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 130
feat: Support multiple image match in findByImage #449
Merged
Conversation
This file contains 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
Please bump the minimum version of the appium-support module in package.json |
refactor: remove MATCH_TEMPLATE_MULTIPLE and use the options instead to denote multiple match behaviour fix: don't mess with the result for the other modes
KazuCocoa
reviewed
Jan 22, 2021
@khaong Do you have time to finish the PR? |
Apologies, things got busy (we came out of lockdown in Melbourne 😅) - I'll spend some time on it this weekend |
@@ -45,17 +60,34 @@ commands.compareImages = async function compareImages (mode, firstImage, secondI | |||
case MATCH_TEMPLATE_MODE.toLowerCase(): | |||
// firstImage/img1 is the full image and secondImage/img2 is the partial one | |||
result = await imageUtil.getImageOccurrence(img1, img2, options); | |||
|
|||
if (options.multiple) { | |||
return result.multiple.map(convertVisualizationToBase64); |
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.
👍
mykola-mokhnach
approved these changes
Feb 19, 2021
4 tasks
KazuCocoa
added a commit
to appium-boneyard/appium-plugins
that referenced
this pull request
May 21, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Hi,
For my appium use case, there may be multiple places on the screen which has the same image and I'd like to find them all.
I am not a javascript dev by trade, so would definitely welcome any comments on this!
Thanks
Alex
Depends on these changes in appium-support: appium/appium-support#212 -> now published in 2.50
TODO: bump the appium-support version number to bring in those changes