SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    May 2007
    Posts
    75
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Value stored in action not carried to next action

    Hi,

    In my test, there are two actions. At the end of the first action, an ID is created in the application. I instructed QTP to capture that ID and store that value as x (using the code x = Browser().Page().WebElement().GetRoPropert())

    Immediately after the above statement (in the same action), I added the statement “Msgbox x” which retrieves correct value of the ID

    I noticed that the value x is not carried over to the second action. That is, if I place “Msgbox x” in the beginning of SECOND action, I noticed that QTP does not remember the value of x from the first action.

    For my testing, I need to take the ID in the first action and enter it in a WebEdit object of the second action. But the value identified in the first action is not carried over to the next one. Please advise me on how to carry over value stored in the first action and input it in to the second one.

    Thanks!

  2. #2
    Senior Member
    Join Date
    Feb 2008
    Location
    Los Angeles, CA, USA
    Posts
    861
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Value stored in action not carried to next action

    from the Forum's FAQ

    34. Passing and then Dereferencing Parameters
    34.A http://www.sqaforums.com/showflat.ph...363610--action parameters
    34.B http://www.sqaforums.com/showflat.ph...362922--action parameters
    34.C http://www.sqaforums.com/showflat.ph...;Number=468664 --test parameters
    -Suchit

  3. #3
    Member
    Join Date
    May 2007
    Posts
    75
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Value stored in action not carried to next action


    Thanks!

    I think I have figured out an easier solution. By exporting the RO value to datatable and by calling the same in the second action, looks to be an easy solution:

    something = Browser().Page().WebElement().GetRoProperty()


    Variable=DataTable.AddSheet ("Results").AddParameter("something", something)

    x=DataTable.Value("something","Results")

    Browser().Page().WebEdit().Set x

    Thanks!

  4. #4
    Junior Member
    Join Date
    Aug 2008
    Location
    Mechelen,Belgium
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Value stored in action not carried to next act

    you can go for an easier approach by

    capturing the required value of x

    x = Browser().Page().WebElement().GetRoPropert()

    and then set it as an Environment variable "Y" by

    Environment.Value("Y") = x

    then use it across any number of actions you wish.

    Thanks,
    Dev

  5. #5
    Apprentice
    Join Date
    Apr 2008
    Posts
    16
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Value stored in action not carried to next act

    Why dont you use output parameter to capture value from first action then pass it as an Inputparameter to second action
    Thanks

  6. #6
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Value stored in action not carried to next act

    You can also use something like this

    http://www.knowledgeinbox.com/docume...aredstore.html

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:06 AM.

Copyright BetaSoft Inc.