Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New Test Parameters
#7
Not Solved
It's actually quite easy for Environment parameters to be created (they are the ones found under "File\Settings\Environment\User-defined" and are visible/editable in ALM/QC).
Code:
'Instantiate the QTP OTA
    Set App = CreateObject("QuickTest.Application")
    App.Launch
    App.Visible = True

'Open a test as required
    App.Open "C:\Program Files\HP\QuickTest Professional\Tests\trial", True

'To add an environment variable to a test
    App.Test.Environment("MyNewParam") = 2

'To change an existing variable just re-write over the variable
    App.Test.Environment("MyNewParam") = "Two"

'Exit safely ;)
App.Test.Save
App.Test.Close
App.Quit
Set App = Nothing
Not sure how you would delete a variable though...
Also not sure why it bypasses the ParameterDefinitions methods or if they are different in a way that would benefit the user to use them separately.
Reply


Messages In This Thread
New Test Parameters - by VenkataBonu - 08-09-2012, 11:31 AM
RE: New Test Parameters - by Saket - 08-09-2012, 11:55 AM
RE: New Test Parameters - by pradeep singh - 08-09-2012, 12:04 PM
RE: New Test Parameters - by VenkataBonu - 08-09-2012, 12:05 PM
RE: New Test Parameters - by vIns - 08-09-2012, 06:35 PM
RE: New Test Parameters - by SteveS - 08-09-2012, 07:54 PM
RE: New Test Parameters - by cflow - 12-10-2013, 09:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set data parameters Mik2s 1 1,480 03-07-2019, 10:18 PM
Last Post: supputuri
  Part of parameters missing when passing between actions skumar007 1 2,990 10-10-2014, 02:00 AM
Last Post: skumar007
  Launching .exe file with parameters magnifyingone 1 3,152 08-28-2014, 06:39 PM
Last Post: dplank
  Need Help Understanding Parameters alex228015 0 2,285 03-18-2014, 12:30 AM
Last Post: alex228015
  Using ALM parameters to drive QTP Brian.Osborne 0 5,074 06-19-2013, 11:23 PM
Last Post: Brian.Osborne

Forum Jump:


Users browsing this thread: 1 Guest(s)