I changed the script from storeEval to executeScript_Sandbox and now it runs ok. But something still needs to be improved with your regular expression, because now I get “screenshot_for_httpsuivisionrpadocsseleniumideforeach.png” - so stripping some parts of the URL is still missing.
{
"Name": "test",
"CreationDate": "2020-4-8",
"Commands": [
{
"Command": "comment",
"Target": "csvRead // urls.csv",
"Value": ""
},
{
"Command": "store",
"Target": "https://ui.vision/rpa/docs/selenium-ide/foreach",
"Value": "col1"
},
{
"Command": "open",
"Target": "${col1}",
"Value": ""
},
{
"Command": "comment",
"Target": "Remove non alphanumeric chars from URL, so we can use it as screenshot file name",
"Value": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "var string = ${col1}; var stripped = string.replace(/[^A-Za-z0-9]/g, ''); return stripped;",
"Value": "alphanumericonly"
},
{
"Command": "captureScreenshot",
"Target": "screenshot_for_${alphanumericonly}",
"Value": ""
},
{
"Command": "localStorageExport",
"Target": "screenshot_for_${alphanumericonly}.png",
"Value": ""
}
]
}