The demo-download macro appears to pause while waiting on the download (in firefox), a direct copy-paste of the code with only the click commands changed for my website… doesn’t. It will move on to the next steps even when I selected an option that would refuse to serve up the pop-up from which the download would initiate. I tried in Chrome in case there was some incompatibility and that didn’t work either. Chrome code:
{
"Name": "pdftest2",
"CreationDate": "2023-1-12",
"Commands": [
{
"Command": "store",
"Target": "60",
"Value": "!timeout_download",
"Description": ""
},
{
"Command": "store",
"Target": "60",
"Value": "!timeout_wait",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "var d=new Date(); return d.getFullYear() + '-' +((d.getMonth()+1))+'-' +d.getDate();",
"Value": "todaydate",
"Description": ""
},
{
"Command": "echo",
"Target": "Today is ${todaydate}",
"Value": "",
"Description": ""
},
{
"Command": "onDownload",
"Target": "DownloadTest3",
"Value": "true",
"Description": ""
},
{
"Command": "store",
"Target": "${!runtime}",
"Value": "starttime",
"Description": ""
},
{
"Command": "XClick",
"Target": "xpath=//*[@id=\"m_lbPrint\"]/span",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "xpath=//*[@id=\"m_btnGenerate\"]/span",
"Value": "",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return parseFloat(${!runtime})-parseFloat(${starttime})",
"Value": "downloadtime",
"Description": ""
},
{
"Command": "echo",
"Target": "DownloadTest3 took ${downloadtime} seconds",
"Value": "blue",
"Description": ""
}
]
}
It tells me that “DownloadTest3 took 2.6799999999999997 seconds”, except there was no download. The download did not begin for another 10-15 seconds, and when it began it was given the auto-generated name, not the onDownload name.
Another strange thing is that if I add an empty ClickAndWait command to the end of that script just to pause it for 10 seconds, when the download occurs, it will be renamed as I specified. However, it is not waiting for a download before moving on to the next steps. I don’t understand why. I would be more than happy to show a video of said behavior over a private message should you need more information.