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 (488)
 QTP interview questions  QTP Interview Questions (3509)
 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 (387)
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 the cases in which we use XML and accessibility check points.   2
how to merge 2 object repositories in qtp 9.0.what is use of merge and y merge is used?   1
How can you connect the database with QTP?   3
in QTP we test web based application at that time what script is run? is support vb script? plz tell me   3
how to display message with out using msgbox function? AppLabs 5
When The Low Level Recording is Used in QTP   17
I recorded a Web based Application running on JAVA and when I went to play them back a week later they didn't run. I noticed that the Browser was putting in a (Underscore and a Number) for each line so i re-recorded and noticed the Underscore line wasn't the same as what i recorded last week so any script I record today will not work next week because the browser settings or how QTP recognizes it keeps changing. This is the new line Browser("Bureau of Labor Statistics_4").Page("Bureau of Labor Statistics").JavaApplet("SurveyApplet").JavaList ("Select an Area").Select "U.S. city average" This is the old line 'Browser("Bureau of Labor Statistics_3").Page("Bureau of Labor Statistics").JavaApplet("SurveyApplet").JavaList ("Select an Area").Select "U.S. city average" Notice the Burearu of Labor Statistics_3 adn Burearu of Labor Statistics_4. Why does it change and how do I prevent it from changing.   5
i'm using QTP 8.2, How should i select(browse) object repository from desktop(or from local local drives like C:\,D:\)?. Note:- object repository to select(browse) is been sent by some other person who is using QTP 9.0   1
suppose i have one datatable in my datatable in 2 nd row 3rd column one link is ther i need to validate that link how do u do this?(wipro) Wipro 4
For Regression testing already written test cases are sufficient? CTS 2
whaht is the difference between CLASS & OBJECT? accenture 2
Have you performed Debugging and how did you?   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