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
feat(image-plugin): Make it possible to find elements inside of other elements #18555
Conversation
@jlipps Could you please check the PR one more time? I did some more changes. I've also replaced jimp with sharp for opencv module (the first one was failing to decode some pictures with weird errors). I would like to get rid of jimp completely for this plugin in favour of sharp and it would probably be a good idea to do the same in appium/support. I believe @boneskull will also be happy about that |
this.imgElCache = new LRU({ | ||
max: MAX_CACHE_ITEMS, | ||
maxSize, | ||
sizeCalculation: (el) => el.template.length, | ||
sizeCalculation: (el) => el.template.length + (el.matchedImage?.length ?? 0), |
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.
ah so here's the source of the memory leak? nice find!
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.
no, it is not, but this is anyway more precise than before
we should probably release this as a major version bump |
why so? I did not do any breaking changes |
drivers used with the plugin must now implement |
Ok, let me put the getWindowSize as a fallback |
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.
OK great!
Proposed changes
appium/java-client#1891
Types of changes