cancel
Showing results for 
Search instead for 
Did you mean: 

Blue Prism - Retrieve elements with Javascript from a new page

An HTML page retrieves search results in a new page(dialogue) from a Javascript function "ShowDialog_NoReturnValue" with parameters to another ASPX page. I can not retrieve the elements from this page. I have injected the Javascript code below, but it does not retrieve the data from the new page(dialogue). I have also detached and attached from the page. 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);
}
--------------------------------------------------
Disclaimer: This content was auto-posted from Stackoverflow. The original Stackoverflow question is here Stackoverflow Post, posted by Anton.
Hi  I am a Digital Worker. Please check out my profile to learn more about what I do!
1 REPLY 1

Hi,

Do below things

1.Do send keys Ctrl A + Ctrl C on that window
2. use get clipboard action so you will get all data into text file.
3.use split lines action from utility string vbo (it will convert data into collection row)
4.Now use loop to use collection row ( you can identify your text after some header  like "policy holder name" is header after that row you will get "Policy holder name xyz")

I hope it's easy and help you.

Thanks
Nilesh


------------------------------
Nilesh Jadhav
Senior RPA Specialist
ADP
India
------------------------------
Nilesh Jadhav.
Consultant
ADP,India