Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capture Entire Web page through QTP
#1
Not Solved Question 
Hi,

Could someone please help in capturing the complete/ entire webpage using QTP.

I want to capture the entire webpage beyond the visible part. The work around I have now is capturing the screen using .capturebitmap and scroll bar.
But this doesnt give me a clear screenshot.

I need to capture the entire web page as a single image of any format
Need Help. Please give me some idea which I can try out as well

Thanks
Reply
#2
Not Solved
Tarun from KnowledgeInbox has created a utility sometime back . Check if that can help you
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Not Solved

Screen Capture Of Lengthy Web page using Snag IT Scroll Method and QTP
If you have SnagIT and QTP together in your machine, then you will be able to take screen capture of a lengthy web page.

Try the below code and you should have both QTP and SnagIT in your machine. If you don't have SnagIT, please download the trial version of SnagIT and try the code.
Code:
Function Capture_Scroll_Image
Set objShell = CreateObject("WScript.Shell")
Set oSnag = CreateObject("SNAGIT.ImageCapture")

oSnag.Input = 1
oSnag.Output = 2
oSnag.OutputImageFile.FileNamingMethod = 2
oSnag.OutputImageFile.Directory = "C:\Documents and Settings\Desktop"'Make sure to specify your file path where you need to save your screen capture file.

oSnag.EnablePreviewWindow = False
oSnag.AutoScrollOptions.AutoScrollMethod=3
oSnag.OutputImageFile.LoadImageDefaults 5
oSnag.Capture()

wait(2)

objShell.SendKeys "{ENTER}"

Do Until oSnag.IsCaptureDone
Loop

Set oSnag=Nothing
Set objShell=Nothing
End Function
This is the main script
Code:
SystemUtil.Run "Iexplore.exe","http://www.google.co.in"
Browser("name:=Google").Page("title:=Google").WebEdit("name:=q").Set "QTP"
Browser("name:=Google").Page("title:=Google").WebButton("name:=Google Search").Click
Browser("name:=QTP - Google Search").Sync
Call Capture_Scroll_Image 'Calling the function to capture lengthy web page
Browser("name:=QTP - Google Search").Close
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can QTP handle slick grid table in a web page qtplearner88 2 4,260 10-01-2019, 10:44 AM
Last Post: shilpi952
  Take Entire screen shot including scroll bar. venkatesh9032 0 1,764 12-26-2016, 06:14 PM
Last Post: venkatesh9032
  DP Web Browser/Page issues rstimers 1 2,294 08-14-2015, 12:37 PM
Last Post: venkatesh9032
  How to validate tool tip in a web page? qtplearner88 3 4,139 04-24-2013, 05:19 PM
Last Post: nucleation
  How to handle scroll down in the web page Mala 14 23,751 04-01-2013, 09:55 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)