How we can add actions in the test using QTP?

Answers were Sorted based on User's Feedback



How we can add actions in the test using QTP?..

Answer / sowmya

Your question was how to add actions in the test.
Are you trying to add a new action in the test itself or are
you trying to call an existing action?

1.If you are trying to add a new action: Alt I then N
or go to insert and select new action. It will generated
Action 2

2.Again the same procedure go to insert and you can select
Call to Copy of an Action or an Existing Action

Is This Answer Correct ?    5 Yes 0 No

How we can add actions in the test using QTP?..

Answer / sreeprasad

There are four actions call to action ,copy of action,call

to exesitng action,call to winner,split action just right

click on any one select it

Is This Answer Correct ?    2 Yes 0 No

How we can add actions in the test using QTP?..

Answer / sandeep

Please refer to this VB Script.

You can add new action programmatically also.

' Dim qtApp, ActionContent, ActionName, ActionDescr,
NewAction, SecondAction, script
Set qtApp = CreateObject("QuickTest.Application") ' Create
the application object
qtApp.Launch
qtApp.Visible = True
qtApp.New

ActionContent = "Window(""Calculator"").WinButton
(""1"").Click" & vbCrLf & "Window(""Calculator"").WinButton
(""+"").Click" & vbCrLf & "Window(""Calculator"").WinButton
(""+"").Click" & vbCrLf & "Window(""Calculator"").WinButton
(""="").Click"
ActionDescr = "A new sample action for the test."
ActionName = "Action" + CStr(qtApp.Test.Actions.Count + 1)

'Add a new action at the begining of the test

Set NewAction = qtApp.Test.AddNewAction(ActionName,
ActionDescr, ActionContent, False, qtAtBegining)



For Attributed like ActionContent, please read all text
from any Text file in which you have already written some
code.


With this help you can generate new QTP Script pretty
quickly.

Is This Answer Correct ?    1 Yes 0 No

How we can add actions in the test using QTP?..

Answer / thangaraj

Set NewAction = qtApp.Test.AddNewAction(ActionName,
ActionDescr, ActionContent, False, qtAtBegining)

Is not working. Please let me know the exact code for
creating a new action. Thanks in advance

Is This Answer Correct ?    1 Yes 0 No

How we can add actions in the test using QTP?..

Answer / rafi

just right click on the test pane select action if you want
give action name

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

How to analyzing the checpoint results?

0 Answers  


For the below written code , i want to be stop the loop (ex:10 times), but it is focusing to first line of the code & generating error. vbwindow("vbname:=frmMain").Type micAltDwn + "6" + "2" + "D" +micAltUp 'wiil open the particular window in application vbwindow("vbname:=frmDeduction").vbbutton("vbname:=cmdNew").Click DataTable.ImportSheet"F:\QTP VBScript\Form 26-1.xls","Deduction",Global RowCount = DataTable.GetSheet("Global").GetRowCount i=RowCount For j =1 to i 'vbwindow("vbname:=frmDeduction").WinObject("nativeclass:=DataComboWndClass","abs_y:= 187").Type DataTable("Name", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type DataTable("Name", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type micTab vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type DataTable("Section", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type micTab vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtOfPay").Set DataTable("Amount_of_Payment", dtGlobalSheet) vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Set DataTable("Amount_PaidCredited_Date", dtGlobalSheet) vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Type micTab vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type DataTable("Deduction_is", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type micTab vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdSave").Click DataTable.SetNextRow Next vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdClose").Click

0 Answers  


Can you write User defined function for WebEdit ? Note1: This function can be used for all web edits in all pages Note2: Don't use Child objects method

1 Answers   IBM,


HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif

7 Answers   Xavient,


How to track the execution time?

2 Answers  






what are the Common Problems in S/w development process

1 Answers  


how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

0 Answers  


what happen in object repository(shared)if we call an existing action from an external action ? and what happen in object repository(peraction)if we call an existing action from an external action ?

2 Answers  


In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail

0 Answers   Yahoo,


HI How to take screenshots of a Webpage and saving it in a external word document using QTP.

4 Answers   3i Infotech, TCS,


Login to flight app, in window flight reservation set the date field and select flyfrom as Frankfurt and verify whether flyto list box has the item FrankFurt, log the results.

1 Answers   Cap Gemini,


How to run a script from lines 50 - 100 alone (if the script has 1- 200 lines of code)?

6 Answers  


Categories