Posted: 10 Feb 2017 5:01 EST Last activity: 16 Oct 2018 12:03 EDT
How to automate download of a file in internet explorer using Pega Robotic Studio 8 (Openspan)
When we click on file download- we get a popup in Internet Explorer with options as Open, Save or Cancel. How to automate clicking on either of these buttons, as we are not able to inspect these buttons via start interrogation feature.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Have you tried interrogating these buttons? If they are the ones I think they are, then you can simply interrogate them and call PerformClick. Are you able to post a screenshot of the buttons?
As an aside, I would suggest you almost always perform a save versus a save as. This presents less steps to automate and calling save will always place files in a known location and handle duplicates automatically. You can then move the file to wherever you need it to be and rename it in the process as needed.
You can interrogate the Notification Bar, but it will give you parent controls and not the individual buttons. There are 2 ways to automate the download.
1. you can send %s key to parent control using SendKeys functions, it saves the downloaded by to default download folder. You can use Hide method of controls to hide the notification bar if you want. You need to give some pause once you send the key.
2. You can interrogate the notification bar and add control region and define region for save button and close (X) icon. You can perform clicks on these regions to automate the notification bar in IE. To enable control region related function its better to make changes in OpenSpan.ini which is at C:\Program Files (x86)\OpenSpan\OpenSpan Studio for Microsoft Visual Studio 2015\openspan.ini. Search [GDI] section, make Enabled=1, make AllProcesses=1. Then you can read the text message on notification bar to identify whether notification is for 'Do you want to open or save..?' or '...download has completed.' message.
Attached some screenshots for help. Let me know if it helps, or the way you did.
I have used the control region method to download file in IE.But Iam not able to perform click on the control region selected even after changing enable=1 and allprocess=1 in openspan.ini.Can you please post screenshots of the automation.
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.