Forum Discussion

sangmook's avatar
sangmook
Occasional Contributor
7 years ago

How can I take a full page snapshot? I mean the whole page, not the only visible part.

Same as the title.

 

I use testcomplete to check whether the right page shows up or not.

 

For that, I need a full page screen shot.

 

Thank you.

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    After you execute an action to navigate to a page, if you call the new page's Wait method, that method will return one of two things.  From the help:

    "

    The Wait method returns the URL of the page or resource that was loaded last on the page. If the web page does not contain frames and the page was loaded successfully, the Wait method returns the page’s URL. If the page contains frames, the method will return the URL of the last page that was loaded in the frame.

    If the loading was not successful or the page was not loaded before the time limit specified by the WaitTime parameter was reached, the method returns an empty string."

     

    This is a more accurate check to see if your page loaded than a region comparison.  You check the string that is returned... if it contains the correct URL, you're on the right page.  If it returns a blank string, you're on the wrong page.

     

    If you still want to do an image comparison, you would use the PagePicture method to capture the whole page.

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    One more option, you can change the Capture Style under Tools > Current Project Properties > Visualizer

     

    • sangmook's avatar
      sangmook
      Occasional Contributor

      shankar_r wrote:

      Hi,

       

      One more option, you can change the Capture Style under Tools > Current Project Properties > Visualizer

       


      I check the 'desktop' but nothing changes. It only show all the whole page of screen that is visible.

       

      I want to take a snapshot of entire page from all the way from top to the bottom.

       

      Could you give me an advice again?



      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        As mentioned already, if you use Aliases.browser.myPage.PagePicture(), this will get you the full web page picture, even those parts that are off screen.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    If you are talking about web page then .PagePicture() method should work for you.

    If you are talking about desktop window with scrollers then, unfortunately, .Picture() method captures only visible part of the window and you must scroll and stitch image parts manually.