Ashok Ojha (AshokO07)

AshokO07 Member since 2017 12 posts
Posted: August 17, 2017
Last activity: September 15, 2017
Posted: 17 Aug 2017 5:48 EDT
Last activity: 15 Sep 2017 10:43 EDT

Print & Save PDF displaying in iFrame

Hello Community members,

My automation requirement is to print/save the multiple statements which is in form of PDF and they are shown in a iFrame (Web Application). I've developed an automation logic that works for me but it is inconsistent and it fails anytime. Therefore, I need you help/suggestion to make the logic consistent.

As part of my logic, I've interrogated the DIV element (contains iFrame) then created the automation step as below:

1. Focusing the DIV
2. Sending key on IE frame [applying SendKeys(^p,True)], It brings Print window of PDF statement
3. Waiting for Print window to create [applying WaitForCreate for Print window]
4. If Print window is created then sending key on Print form [applying SendKeys({ENTER},True)]

The above logic is working for me but it is not consistent; it fails sometime after printing 10 statements or sometime more.

1. If previous PDF contains more pages and takes long time to print,the automation fails on step-3 because WaitForCreate for Print window returns false for new statement (PDF). I've noticed that PDF shows a progress bar (when there are number of pages) while printing, which delays the next statement process. I'm unable to interrogate the 'progress bar' window which appears on top of PDF while print is in progress.

2. The automation fails when user try to work on other application because the focus got change from 'Print' window.

3. If I click the DIV manually then the SendKeys[+(^S), true] opens the 'Save As' window. However it does not open without DIV click. I've tried PerformClick() on DIV but it did not help me.

I have attached the HTML of the page and the screenshot of my automation logic for your reference.



Robotic Process Automation Support Case Exists
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.