This is a migrated thread and some comments may be shown as answers.

Problem with pages that contain PDF documents

5 Answers 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Amos
Top achievements
Rank 1
Amos asked on 17 Dec 2010, 10:14 AM
Hi,
I have a problem with pages that contain PDF documents like in the image.
I want to open and close the page with this code but when i try to close the page IE crashes and the page remains open.
For this test I use Windows 7 64 bit, IE 8, Adobe Reader 9, Visual Studio 2010 and Telerik.WebUI.TestStudio.Dev.2010.3.1126.
Can you help me?
Thank you.
Amos

// Connect to pop-up window : stringPath
Manager.WaitForNewBrowserConnect(stringPath, true, timeout);
Manager.ActiveBrowser.WaitUntilReady();
 
// Close pop-up window : stringPath
Manager.ActiveBrowser.Close();



5 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 20 Dec 2010, 01:45 PM
Hi Amos,
  thank you for your feedback!

I've managed to reproduce the problem - it only appears in WebUI Test Studio Developer edition. And then only if you run your test under Internet Explorer. In any of the other browsers navigation to and from PDF pages works fine.

I've filed a bug on the issue:
Bug 102784: PDF pages crash under Internet Explorer

We'll notify you immediately when a solution becomes available in an Internal Build. Meanwhile - please use a different browser for your PDF test.
Also keep in mind we don't really support PDF - the most you can do is verify that a page contains a PDF embed tag.

Again - thank you for the feedback! We're relying on customers like you to help improve our product!

All the best,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Amos
Top achievements
Rank 1
answered on 20 Dec 2010, 05:37 PM
Thank you for the response,
unfortunately the website that I test runs only with IE.
I hope in a fix of the bug.
Thanks 
Amos.
0
Stoich
Telerik team
answered on 21 Dec 2010, 03:56 PM
Hello Amos,

maybe you can try testing your PDF pages with regular navigation steps instead of treating them as pop-ups?
For instance the following step:
"Navigate to 'http://www.opm.gov/hcaaf_resource_center/assets/Lead_tool3.pdf'" 
will work in Internet Explorer. Once you've logged on the page you can write a Verification steps checking whether an "embed" tag with the desired properties is present on the page. You can add the embed tag to your project by opening the Dom Explorer for the page and locating the embed tag there. You can't access the embed tag from the page otherwise - the PDF file takes up the entire page and WebUI Test Studio has no way of interacting with PDF.

Also one more thing: WebUI Test Studio will regard a PDF page as immediately ready to use - it won't wait for the PDF to load because PDF files are meant to be loaded asynchronously. If you want to wait for the PDF to load you'll need to delay execution yourself (i.e. Delay Execution step).

Once you're done with the PDF page you can simply navigate back from it.

Let me know whether this solution works for you!

All the best,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Amos
Top achievements
Rank 1
answered on 03 Jan 2011, 05:09 PM
Hi,
sorry for the delay to respond.
I try to run your solution but IE crashes continuosly,  in fact in my case the PDF page is a pop-up.
I solved my problem with this code (is not the correct solution but allow me to close correctly the page without that IE crashes).
However I hope in a fix of the bug.
Thanks 
Amos.


// Close pop-up window
Desktop.KeyBoard.KeyDown(System.Windows.Forms.Keys.Alt);
Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.F4);
Desktop.KeyBoard.KeyUp(System.Windows.Forms.Keys.Alt);
0
Stoich
Telerik team
answered on 05 Jan 2011, 01:57 PM
Hi Amos,
    I'm glad to hear you managed to find a workaround for this issue. Our developers are looking into this - I hope we'll be able to provide you with a fix in the form of an internal release soon enough.

Please don't hesitate to contact us again if you have any more questions.

Regards,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Amos
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Amos
Top achievements
Rank 1
Share this question
or