V7 uses Manifest V3 and this brings a breaking change for ExecuteScript**_Sandbox**. To be able to keep the very useful Sandbox version we had to switch ExecuteScript_Sandbox to a new Javascript engine. This works, but the new engine is somewhat limited:
- It only supports ES5 Javascript (not ES6 as before). Example: replace ES6 .includes with ES5 .indexOf
It can not return arrays. => You will get a “target must be an array” error in UI.Vision.
Update July 22: The array issue is solved. In V7.1.12 (and newer) the executeScript_Sandbox command supports returning arrays again
The workaround for both issues is to switch to executeScript
instead. ExecuteScript (which runs in the website) remains 100% unchanged. To modify your existing macros the (only) change you need to make is to
- Change the command from _Sandbox to executeScript (example here or here)
- Make sure a website is loaded in the browser, because executeScript runs inside the website. Any website or even a local HTML file will be sufficient.
But for most simple Javascript calculations the new JS engine should work just fine. To test if your Javascript runs in the new ExecuteScript_Sandbox you can use this website: