I have a link that opens microsoft word. When i type anything in the word file and save, these steps are not recorded, when i am doing the recording in QTP.Can you guide me with that of how to do it.

Questions by mabobine   answers by mabobine

Showing Answers 1 - 2 of 2 Answers

Hi

Befor recording you have to do the following settings.

1: Launch QTP -> Test -> record and Run setting. In Record and Run setting window select the first radio button i.e "Record and run test on any open Web Browser" -> press Apply -> OK.

NOTE : While recording every event that is every mouse click has to be performed properly.

Now u can record and save the data from a word application.

Below is the code which i have executed, it absolutely worked fine.

You can compare when you record.


******************************************************************
Line 1: SystemUtil.Run "C:Program FilesMicrosoft OfficeOFFICE11WINWORD.EXE","","",""

Line 2: Window("Microsoft Word").WinObject("Microsoft Word Document").Type "text text text text"

Line 3: Window("Microsoft Word").WinObject("Standard").Click 69,14

Line 4: Window("Microsoft Word").Window("Save As").Click 303,11

Line 5: Window("Window").Click 41,10

Line 6: Window("Microsoft Word").Window("Save As").WinObject("Text text text text").Click 97,7

Line 7: Window("Microsoft Word").Window("Save As").WinObject("Text text text text").Type "save"

Line 8: Window("Microsoft Word").Window("Save As").Click 532,320

******************************************************************

Regards
Bindu Dey.

Hi Bindu,

Check this code, sounds simplier than what u specified

SystemUtil.Run "C:Program FilesMicrosoft OfficeOFFICE11WINWORD.EXE"

Window("Microsoft Word").WinObject("Microsoft Word Document").Type "Hi"

Window("Microsoft Word").WinObject("Menu Bar").Click 37,12

Window("Microsoft Word").Window("File").Click 34,34

Window("Save As").Click 511,313

Thanks,
Kamal

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions