I can use following script to find image “image100x100” with 50% scale:
put imageFound(imageName: “image100x100”, scale: 0.5)
I can use following script to find image “image100x100” with 100% scale:
put imageFound(imageName: “image100x100”, scaleToSize: [1006, 753])
But I can’t use following script to find image “image100x100” with 50% scale:
put imageFound(imageName: “image100x100”, scaleToSize: [1006*.5, 753*.5])
The issue with the script that isn’t working could be due to the use of the multiplication operator * within the array. In many scripting languages, you cannot perform arithmetic operations directly inside an array or function argument list.
Adding parentheses made the code work for me by forcing the values to be calculated first before they were passed as scaleToSize parameters: put imageFound(imageName: “image100x100”, scaleToSize: [(1006*.5),(753*.5)])