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
whenever U using QTP,Test Director, Why we using separate Bug tracking tool?
Mention what are the different types of recording modes in qtp? Which will be used when?
How you can decide which type of object repository you have to use?
HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...
Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)
i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji
How is recording done when a application is over lapping the QTP application it gives a message object not recorded
Give me some real time point of way where exactly we can conduct audits?
What is the difference between call to existing action and copy of an action?
How the exception handling can be done using quicktest professional (qtp)?
Explain the N-tire structure(process) for Funds Transfer ( means give N ways to funds Transfer in an Application)
what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”
What are the different properties of an web object
can i compare two databases using QTP ?
How the smart identification is used in real time?Please explain with an example