2.0.0
Breaking changes introduced with nut.js version 2.0.0
#
ImageFinder Providers@nut-tree/nut-js
introduced a plugin system and no longer ships image matching code by default.
To use image matching functionality one will have to install an additional package, providing the actual implementation to perform image comparison.
Otherwise, all functions relying on image matching will throw an error like Error: No ImageFinder registered
.
One available option would be @nut-tree/template-matcher
:
If you want to keep using your existing setup, install a suitable provider, e.g. above mentioned package.
To use this provider package, simply require it in your code, e.g. index.js
:
Screen.find
#
#
Template ImagesTemplate images are no longer loaded from screen.config.resourceDirectory
by default.
Instead, an Image
has to be passed.
If you want to keep using your existing setup, you can wrap the image filename in a call to imageResource
.
Screen.waitFor
#
#
Template ImagesTemplate images are no longer loaded from screen.config.resourceDirectory
by default.
Instead, an Image
has to be passed.
If you want to keep using your existing setup, you can wrap the image filename in a call to imageResource
.
#
Configurable intervalThe update interval used by waitFor
used to be fixed to 500ms.
With release 2.0.0, waitFor
received an additional parameter to configure this interval.
If you want to keep using your existing setup, pass an interval of 500ms to waitFor
.
LocationParameters
#
The LocationParameters
object has been dropped. Please use OptionalSearchParameters instead.