SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Senior Member
    Join Date
    Aug 2004
    Location
    Zurich
    Posts
    102
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to Get a Value of a Define Value in QTP

    Hi All,

    How to Get the Value of a Constant/Variable in QTP just like Winrunner.

    Example :
    I am giving Winrunner Script
    public Constant MyVariable = 5;
    t = getvar("MyVariable");
    Now t value is 5 and I able to Get the Value of My Constant MyVariable any time during Run Time in Winrunner ..

    Is there any Similar Method in QTP to Get Value of MyVariable.

  2. #2
    Member
    Join Date
    Jun 2005
    Location
    Bangalore
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    in qtp you just have to do t=MyVariable

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    Zurich
    Posts
    102
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    Hi Ganges,

    Plz read my Question ..
    I am asking is there any Similar Method in QTp Rather than assigning to Other Value ...

  4. #4
    Senior Member
    Join Date
    Oct 2004
    Location
    Bangalore
    Posts
    270
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    Hi,
    directly u can use that variable, whats the problem???? thats the concept of variable.

    Yogi

  5. #5
    Senior Member
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    529
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    in QTP:

    const MyVariable = 5
    t = MyVariable

    t now = 5 also.
    I'm not a complete idiot - some parts are missing.

  6. #6
    Member
    Join Date
    Jun 2005
    Location
    Bangalore
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    Sorry did not read your question one more way is MyVariable.value where MyVariable is your object

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Location
    Zurich
    Posts
    102
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    Hi Ganges,

    Hope you are Clear whatI am Asking here and
    can you give how to set the object to MyVariable

    Hi Mo Test,

    I object your Sugestion, Plz Run the Script before Giving it to QAForms,its Giving an Error...

  8. #8
    Member
    Join Date
    Oct 2002
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    92985,
    This is not the right way to post the questions here. Be polite

  9. #9
    Member
    Join Date
    Jul 2004
    Location
    San Diego, CA
    Posts
    147
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    MoTest solution is correct. I can say that even without testing.
    92985..
    You should try the script without writing "t now = 5 also."

    & like everyone said, Please improve/modify the way you request/reply to the mail. It doesn't look good.

    Thanks
    Prashant

  10. #10
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to Get a Value of a Define Value in QTP

    It doesn't give any error:
    const MyVariable = 5
    t = MyVariable

    MoTest,
    your suggestion works correctly.
    I've just tried it.

    92985,
    Please, correct your manners.

    Regards,
    Janna

 

 

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 8.33%
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 03:41 AM.

Copyright BetaSoft Inc.