How we can add actions in the test using QTP?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
How to analyzing the checpoint results?
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
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
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
How to track the execution time?
what are the Common Problems in S/w development process
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
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 ?
In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail
HI How to take screenshots of a Webpage and saving it in a external word document using QTP.
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.
How to run a script from lines 50 - 100 alone (if the script has 1- 200 lines of code)?