Issues with UI.Vision executeScript_Sandbox javascript

My long time running code recently stopped working. I can’t exactly tell which UI.Vision update might have broken it, but it seems that the last successful run was on 7th July.

I was able to fix one issue myself. The following line in executeScript_Sandbox used to work:
d = new Date(); return `${d.getDate()}.${d.getMonth() + 1}.${d.getFullYear()}`
Thus, I am returning a string containing today’s date.
Now: Error: Unexpected character ‘`’
To fix the code, I changed it to:
d = new Date(); return d.getDate() + ‘.’ + (d.getMonth() + 1) + ‘.’ + d.getFullYear()

The other issue I am stuck:
Previouly working code:
gotoIf_v2 | ${filterArray}.some(row => row.includes(${test_isin})) | L_filtered |
I am searching test_isin in every row of filterArray and if found, jump to label L_filtered
Error now: Unexpected token:

EDIT: solved it this way:
${filterArray}.some(function (row) { return row[1]==${test_isin} } )

Seems like the JS engine has been downgraded to pre ES2015?

Anyway, it sucks, if long-time-finished code doesn’t work all of a sudden and I have to debug and rethink everything. Why is that?

Edit: Ok, just read about RPA Version 7.x JS-Interpreter (executeScript, execute script, Arrays - Selenium IDE Commands Tutorial).

Yeah, that is the issue. We had to make this change for the Manifest 3 compatibility.

Solution is:

  • Use executeScript (no sandbox)

  • Or: Use ES5 Javascript inside executeScript_Sandbox. You can test this new Javascript engine here: JS-Interpreter Demo