Results 1 to 4 of 4
  1. #1

    Supplying Batch files with arguments ??

    Hi, does anybody know:
    I am running my scripts from batch files. Typically, when I run a script in QAWP user interface, it allows me to select the input variables. But a batch file does not. Can I supply a command line argument? How else can we input initial values to scripts run as batch files?

  2. #2
    Join Date
    Mar 2004
    West Coast of the East Coast!

    Re: Supplying Batch files with arguments ??

    I was hoping someone would be able to answer this by now. I would use Repository variables to pass to the scripts. I think they work the same as in normal scripts. Those variables, once declared in the repository, can be set in the command line argument using </Var="Value"> as long as the "Auto-Record Substitution" box is clicked when the original Variable Names are set up.
    Personal Comment

    Success is the ability to go from one failure to another with no loss of enthusiasm.
    ~ Winston Churchill ~

    ...Rich Wagner

  3. #3

    Re: Supplying Batch files with arguments ??

    I am interested in the answer to this question too.

    Does anyone have an answer?

    Thanks for your time...Jerry

  4. #4

    Re: Supplying Batch files with arguments ??

    [ QUOTE ]
    Can I supply a command line argument? How can we input initial values to scripts run as batch files?

    [/ QUOTE ]

    If you have repository variables created for your application you can set the initial values of the repository variables from the command line using /DvariableName="variableValue"

    NOTE: The 'Prompt' checkbox for the repository variables must be set for the command line values to be used.

    If 'Prompt' is not checked, default values for the repository variables will be used if available.

    <font color="blue">EXAMPLE:
    DVariableUsageTestScript.qawbatch contains one script DVariableUsageTestScript.qawscript</font>

    Script.SetContext("WysiCorp Login/1.0")

    Window("WysiCorp Report a Bug").Editbox("editboxUsername").SetText(username1 )
    Window("WysiCorp Report a Bug").Editbox("editboxPassword").SetText(password1 )
    Window("WysiCorp Report a Bug").Button("buttonLogin").Click()



    <font color="blue">... where username1 and password1 are repository variables of type 'Text' set to 'Prompt' for values when a script is run.

    To set values of username1 and password1 from the command line when running DVariableUsageTestScript.qawbatch use the command line as follows...</font>

    C:\&gt;"C:\Program Files\Seapine\QA Wizard Pro\QAWRunScript.exe" DVariableUsageTest.qawbatch /Dusername1="Developer" /Dpassword1="QAWizard"

    <font color="blue"> The string "/D" MUST be appended to the front of the repository variable names when providing the variable values to the batch file from the command line.</font>
    G. Ndefru
    Software Support Engineer
    Seapine Software, Inc.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 03:56 PM.

Copyright BetaSoft Inc.