This discussion is archived
4 Replies Latest reply: Apr 17, 2012 7:43 AM by 930640 RSS

Need help exporting unique variable string for later reuse

930640 Newbie
Currently Being Moderated
For a functional testing web test of a Oracle e-Business Suite 11i application in the i-Procurement module, I'll need to variablize text fields for filling out initial information and extract the confirmation number from the string object "Requisition (unique sixteen digit alphnumeric string)" for use in the next test step and other tests. I prefer using databanks since it automatically maps the variables and doesn't require programming. I'm new to Openscript and definitely not a programmer.

I need to know the **detailed functions/steps** to perform the following:

Step #1 - Find the confirmation number in the string (extract partial string)
Step #2 - Set the confirmation number to a variable
Step #3 - Use the confirmation number variable in the next step
Step #4 - Save the confirmation number to a databank file for each iteration


Thanks,

CM
  • 1. Re: Need help exporting unique variable string for later reuse
    834498 Journeyer
    Currently Being Moderated
    Hello CM

    Step #1 - Find the confirmation number in the string (extract partial string)
    Use "Object test" (toolbar) during recording or afterwards to discover the object type/name/path and attributes

    Step #2 - Set the confirmation number to a variable
    Insert a "Store attribute" on the desired object (if it is a textfield, add -> other -> Web Action -> TextField ->> Store Attribute)

    Step #3 - Use the confirmation number variable in the next step
    Once you have done #2, you can use the variable anywhere in the script later on

    Step #4 - Save the confirmation number to a databank file for each iteration
    Why do you want to do so?
    To write to a file, it could require a bit of scripting


    Hope this helps. This is not exact, but reading the doc and trying by yourself should be enough

    JB
  • 2. Re: Need help exporting unique variable string for later reuse
    930640 Newbie
    Currently Being Moderated
    JB,

    The confirmation number is a unique variable for each iteration that is used in later approval workflow tests. I planned on using a databank for the other variables since it maps the variables for me. I'd like to keep all the variables in a single file but whatever is easiest works for me. I could write the confirmation numbers to the datatable and add an export statement.


    CM
  • 3. Re: Need help exporting unique variable string for later reuse
    834498 Journeyer
    Currently Being Moderated
    As far as you don't need the confirmation number in another separated OpenScript script, no need to write it down into the databank.
    You just have to implement "Store Attribute" and then you have a variable created containing the confirmation number.
    If you really want to keep that number down to a file, you should not store it into the databank file but into a separate file.


    We can provide some Java code snippet if you REALLY want to write into a file :)

    JB
  • 4. Re: Need help exporting unique variable string for later reuse
    930640 Newbie
    Currently Being Moderated
    JB,

    I'm very new to Openscript. Many purchase requisitions with various combinations of data for boundary testing will be created so I will have multiple confirmation numbers that need to be saved. Can I use the store attribute command to save multiple confirmation numbers and how would the next script access every number within the previous test script?


    CM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points