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
How to connect to a database?
Explain in brief about the qtp automation object model (aom).
Mention what are the different types of recording modes in qtp? Which will be used when?
Can the user toggle between using Local OR and shared OR for the same action?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
How to break the object spy ?
1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?
How QA specialist can identify when programmatic descriptions are useful?
Hi , I am facing issue QTP 10.0 with oracle ERP 11i .When QTP opens,click sub links on ERP ,FORM is not opening getting unexpected Internet explorer error message with send or don't send report.So unable to work with forms using QTP.
UFT 12.02 which ALM version will support
Hi ,Can any one pleas explain how to test splash objects using QTP?
Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..
Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?
How does quicktest professional (qtp) identifies the object in the application?
What is an expert view and keyword view?