I have the same issue. Here is a test case for you.
-
Open this: https://ui.vision/rpa/x
-
Run this macro:
{
"Name": "executeScript bug",
"CreationDate": "2021-12-27",
"Commands": [
{
"Command": "store",
"Target": "fast",
"Value": "!replayspeed",
"Description": ""
},
{
"Command": "executeScript",
"Target": "return document.getElementById(\"code\").rows.length;",
"Value": "rowcount",
"Description": ""
},
{
"Command": "echo",
"Target": "rowcount = ${rowcount}",
"Value": "",
"Description": ""
}
]
}
The executeScript lag, in this case, seems to occur only once - on a newly loaded page. The first attempt will take about 5 seconds, the second and so on about 0.1s - 0.2s. If you press F5 on the same page, again the first attempt will take 5s, and the other attempts will take 0.1s - 0.2s.
In 6.2.8 there is a similar issue, but probably no one noticed it as the times are as follows:
First try: 0.68s
Second try: 0.15s
Tested on 2 different devices: laptop and desktop.
Chrome 96.0.4664.110 64-bit version.
The UI.Vision installed on the laptop was updated from 6.2.8 to 6.3.1.
The desktop had a clean install of UI.Vision.
Logs
First attempt:
* [status] Playing macro executeScript bug
* [info] Executing: | store | fast | !replayspeed |
* [info] Executing: | executeScript | return document.getElementById("code").rows.length; | rowcount |
* [info] Executing: | echo | rowcount = ${rowcount} | |
* [echo] rowcount = 4
* [info] Macro completed (Runtime 5.60s)
Second attempt (without reloading the website):
* [status] Playing macro executeScript bug
* [info] Executing: | store | fast | !replayspeed |
* [info] Executing: | executeScript | return document.getElementById("code").rows.length; | rowcount |
* [info] Executing: | echo | rowcount = ${rowcount} | |
* [echo] rowcount = 4
* [info] Macro completed (Runtime 0.24s)