I tried this code but bas variable didnt stored the result, i have checked this code by pasting it in console and the result is getting printed when entered on chrome console. But in bas the result is not getting stored in bas variable when using execute javascript action.
Link where i execute javascript code : https://www.hindigeetmala.net/singer/lata_mangeshkar.php
Code :
var links = document.querySelectorAll("a");
var results = [];
links.forEach(link => {
if(link.href.includes("/song")){
results.push(link.href);
}
})
if(results.length > 0){
var uniqueSet = new Set(results);
var resultsUnique = [...uniqueSet];
VAR_BASNEWVAR = resultsUnique;
return resultsUnique;
}
How can i store the result in bas variable ?