ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Testing >> Automation Testing >> QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions (496)
 Load Runner interview questions  Load Runner Interview Questions (486)
 QTP interview questions  QTP Interview Questions (3495)
 Test Director interview questions  Test Director Interview Questions (161)
 Rational TestSuite interview questions  Rational TestSuite Interview Questions (106)
 Silk Test interview questions  Silk Test Interview Questions (59)
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions (385)
Question
HI How to take screenshots of a Webpage and saving it in a
external word document using QTP.
 Question Submitted By :: QTP
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
''Capture Currently display web page
Browser(objBrow).Page(objPag).CaptureBitmap "C:\Test.bmp",True

''Create word application
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection

Set objRang = objDoc.Range()
Set objShape = objDoc.inlineShapes

''Add Picture to word file
objShape.AddPicture ("C:\Test" & ".bmp ")
objWord.Selection.TypeParagraph()

''Save Word File
objDoc.saveas("C:\Test.doc")
 
Is This Answer Correct ?    8 Yes 1 No
Jegan
 
Answer
# 2
I've tried the code and it works fine. I just have a question here, how can I add a second image at the end of the file. I've tried in different ways but the last image appears at the beginning of the file. 
Is This Answer Correct ?    0 Yes 0 No
Jkarurosu
 
 
 
Answer
# 3
I am using the above code only.

''Create word application first
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection

Set objRang = objDoc.Range()
Set objShape = objDoc.inlineShapes


"Capture Currently display web page
Browser(objBrow).Page(objPag).CaptureBitmap "C:\Test.bmp",True

''Add Picture to word file
objShape.AddPicture ("C:\Test" & ".bmp ")


"Capture Currently display web page
Browser(objBrow).Page(objPag).CaptureBitmap "C:\Test.bmp",True

''Save Word File
objDoc.saveas("C:\Test.doc")
 
Is This Answer Correct ?    0 Yes 0 No
Apurva
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
What are they Advantages and Disadvantages in QTP 9.2? Infotech 1
.qfl extension for which file? where vl use it iFlex 1
abt filter function if iam using below two statments its ok My = Array ("Apples","Oranges", "Apricots") MyResult = Filter(My, "Oran") if i use msgbox MyResult it shows type mismatch plz help me   2
There are 3 types of frame works in QTP 1. Linear frame work 2. Modular frame work 3. Key word driven frame work. Can any body explain the above 3 frame work models. y2k_ram2000@yahoo.com Fidelity 5
how to get the object property Covansys 4
what is regular expression how will you implement it?   1
Batch testing in howmany ways u perfrom in QTP Lehman-Brothers 3
After running scripts how you report results ,there is any specific report form Novartis 5
we have 10 actions in out test how can we convert 9th action is main action ? how ?   5
What are the types of Object Repositories in QTP?   9
More details about keyword driven technique in QTP TCS 1
Hi All, I am a beginner in QTP and have understood the basics of QTP by going through tutorial. I am trying to Automate a HRMIS application, What is the right approach to Automate this application. Kindly answer. Thanks in advance   1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com