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.
#Problem#
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.
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.
#Problem#
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.
Regards,
Ashok