Problem with pages that contain PDF documents

6 posts, 0 answers
  1. Amos
    Amos avatar
    11 posts
    Member since:
    Oct 2010

    Posted 17 Dec 2010 Link to this post

    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();



  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 20 Dec 2010 Link to this post

    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
  3. Amos
    Amos avatar
    11 posts
    Member since:
    Oct 2010

    Posted 20 Dec 2010 Link to this post

    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.
  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 21 Dec 2010 Link to this post

    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
  5. Amos
    Amos avatar
    11 posts
    Member since:
    Oct 2010

    Posted 03 Jan 2011 Link to this post

    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);
  6. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 05 Jan 2011 Link to this post

    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
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!