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 is the use of Accessibility check point? BirlaSoft 8
what testing activities u may want to automate in a project?   2
What are they Advantages and Disadvantages in QTP 9.2? Infotech 1
What is DOM   2
What is descriptive programming? Wipro 14
Which property will you use to check the object state? (Exist) Symphony 2
what are the cases in which we use XML and accessibility check points.   2
Can we directly automate test script according to requirements?   1
Hi experts. I want to create a framework for the Flight Reservation sample application.Can anybody tell me the files and the contents , and how to create them.Thanks IBM 2
Can any body explain me how to prepare QTP frame work with an example?? alexander.gdk@gmail.com   1
HOW TO AUTOMATE CAPCHA IMAGES while creating Gmail account TCS 2
Can we Script any test case with out having Object repository? or Using Object Repository is a must Crea 2
 
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