HI How to take screenshots of a Webpage and saving it in a
external word document using QTP.
Answer Posted / sumit
Try this Jkarurosu:Use Movedown method
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
fname="C:UsersPublicPicturesSample PicturesKoala.jpg"
fname2="C:UsersPublicPicturesSample PicturesTulips.jpg"
objShape.AddPicture (fname)
objWord.Selection.MoveDown 1,0
objWord.Selection.TypeParagraph()
objShape.AddPicture (fname2)
objWord.Selection.MoveDown 1,0
objWord.Selection.TypeParagraph()
''Save Word File
objDoc.saveas("C:UserssunshineDesktopTest.docx")
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
How many add-ins comes by default with quicktest professional?
What is a data driven test in qtp?
What is the extension of qtp local repository?
Hi How to retrieve data from web element line by line?
How can i check items sorted or not in a weblist ? Give me the script for this...
What are the steps involved in recovery scenario wizard?
suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question
I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that
How does you test a weblink which is changing dynamically?
Describe the differences between functions and actions in UFT?
How to test background color and dynamic images during run time can you put the check point for moving objects?
how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance
What is the difference in the global and action sheet in qtp?
explain abt dyanamic changing object with example?
when to start the automation?