Ask a Question

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

sangmook
Occasional Contributor

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 5
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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
shankar_r
Community Hero

Hi,

 

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

 

disable.PNG


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

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.

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
sangmook
Occasional Contributor


@shankar_r wrote:

Hi,

 

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

 

disable.PNG


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
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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
cancel
Showing results for 
Search instead for 
Did you mean: