21-10-20 09:00 AM
I am new to Blue Prism. The page I access you search for a person. If there is a match there will be a link on the same page. When you click this link it opens another page on top of the current page. It executes a javascript function "ShowDialog_NoReturnValue" with parameters to another aspx page. I cannot open this page in a new window the site just goes to the original search page. I can not get the elements from this page. I have injected the below javascript code but it does not get the data from the new page. If I run the code in the console it works but executing in Blue Prism the output is empty. Any other suggestions?
function getScope(){
if (document.getElementById('JSOutput') == null){
var body = document.getElementsByTagName('body')[0];
var text = document.createElement('input');
text.id = 'JSOutput';
text.style.display = 'none';
body.insertBefore(text, body.firstChild);
}
else {
document.getElementById('JSOutput').innerText = '';
}
var a = document.getElementsByClassName('rgMasterTable CaptionTextInvisible');
var c = '';
for (var i =2; i<a.length;i++){
var b = a.textContent.trim().split('
');
if(b[4].trim()!=='There are no records.'){
console.log(b[0] + ' --- ' + b[4].trim());
c = c + b[0]+':'+b[4].trim()+',';
}
}
return c.slice(0, -1);
}
--------------------------------------------------21-10-20 05:31 PM