Forum Discussion

DeepaJ's avatar
DeepaJ
Contributor
9 years ago
Solved

Get & save dynamically generated value in 1 test & pass it as variable in another test

I have a form, where I fill in some information and when it is saved, it generates an Order Number. I want to get and save that value in a variable. When I use the Property Checkpoint here, can I save the value that is found in that field into a variable instead of assigning the value to wText property. I then want to be able to refer to this variable in other tests, where I want to do some action on some rows of data where, the order number is that saved value.

New to TestComplete and automation and would appreciate any help.

Thanks!

  • Crate a project variable, it should be accessible thorought the project.

     

3 Replies

  • finae's avatar
    finae
    Contributor

    Crate a project variable, it should be accessible thorought the project.

     

    • DeepaJ's avatar
      DeepaJ
      Contributor

      Thanks, I was able to get that done.

       

      I have a related question:

      I am not able to get the value of a selected item from a drop down list. How can I do that? Whatever value I selected from a list, needs to be saved to a variable so that it can be selected on another window.

       

      If I use the property checkpoint for this, it does not give me the wText option.

      I am not seeing any wSelectedItem or wItem methods for this object.

       

       

      • finae's avatar
        finae
        Contributor

        I only have experiences with infragistic so i m not sure i can help you with this and I am not sure what type/object your application is using.

         

        Though this is what i would do if i was in your situation:

         

        have your application open to the window with the object you have to deal with

        create a keyword test,

        use the operation: if object  and drag it into the keyword test

        the setup window for the if object.. should open, use the crossfire trigger icon and drag it onto your project.

         

        this should try to map it as a name object.

         

        click finsh,

        go into the namemapping (part of the advance folder  of your project)

        and open it, your map object should be in there,

        if you double click the name object, it should open up all exposeable properties and functions  (though there is no clear indenfication but you should be able to see what type of object it is as well as all function you can use with it).

        If you know the developer of the project form that infmoration go into their site, most will have information of the classes and their properties/methods available as well as explaination of what it does/return, and maybe usage in codes as examples.