Answer Posted / 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 |
Post New Answer View All Answers
What is keyword view?
What is throw object?
regular expression in qtp standar check point for months from accepting months from january to december only
Hi Frenz... I would like to take up the QTP certification . Can anyone tell me what is the procedure. n if anybody have the study materials pls fwd it to jkpunathil@gmail.com
What is the meaning Work bench?
What is quick test pro?
how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance
i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?
What is checking bitmaps?
An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?
What are the different ways to invoke an application using QTP?
What is difference between Recording time object identification and Run time (Execution) time.
How many scripts did you have?
what you mean by artifact,milestone...
Hi Samrat, Thank u very much, what u said it is right.