SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2005
    Location
    Australia
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    can we convert qtp statement to vbscript

    I have these line of code with in action which are used in about 4 or five tests. is it possible to convert these qtp statements to vb script file or function and then call it in any test. or any other solution to exucute these multiple line of code with single statement in any qtp action.

    Thanks

    Browser("Login").Page("Brand Manager_6").Frame("mainpanel").WebList("lstAdminAc tions").Select "New Folder"
    Browser("Brand Manager User Registratio").Page("Brand Manager_5").Frame("ModuleWindow").WebEdit("Asset:I A_Name").Set "Orbis build"
    Browser("Brand Manager User Registratio").Page("Brand Manager_5").Frame("ModuleWindow").WebEdit("Asset:I A_Notes").Set "test"
    Browser("Brand Manager User Registratio").Page("Brand Manager_5").Frame("ModuleWindow").WebButton("Save" ).Click
    Browser("Brand Manager User Registratio").Page("Brand Manager_5").Frame("ModuleWindow_2").WebButton("clo se").Click

  2. #2
    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: can we convert qtp statement to vbscript

    Yes. It is possible.
    Be sure, that Repository of Test Cases, that call this script have all objects, involved.
    (Or use Descriptive Programming to describe your objects in abstract way)
    Don't include CheckPoints into external VBscript.
    They will not work from script.

    The code, you are asking about - should work.

  3. #3
    Member
    Join Date
    Jun 2005
    Location
    Australia
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: can we convert qtp statement to vbscript

    but how should I convert this qtp statements to vb script

  4. #4
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: can we convert qtp statement to vbscript

    You can't convert QTP code to VBScript but (as I think Janna was suggesting) you can place the QTP code in a VBS file wrapped in a function and add the file as an associated library file to those scripts that want to execute the function.

    Mark Smith.

  5. #5
    Senior Member
    Join Date
    Jan 2005
    Location
    VA
    Posts
    237
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: can we convert qtp statement to vbscript

    Hi Janna,

    quote ...
    Don't include CheckPoints into external VBscript.


    What might be the potential issues if checkpoints do be included into external VBS library? I have some, they are working fine now, so far.... Thanks!
    Regards!

  6. #6
    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: can we convert qtp statement to vbscript

    There is lot of discussions of this issue in the group about CheckPoints.
    They work inside of QTP Action script as designed, but if you separate the same code into external VBscript - they don't work.
    What else...
    ExitRun() - doesn't work from VBscript...
    ExitGlobalIteration() - works.

    Of course, it has to be organized in the VBscript accordingly, as Mark added:
    Script --> Functions (or Sub) --> declare library script inside of QTP Action --> call Function --> parse result and so on...

 

 

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.71%
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 04:12 PM.

Copyright BetaSoft Inc.