SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Nov 2004
    Location
    pune
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    get the folder path when QTP test script is saved on TD

    Hi,

    I want to get the folder path of the QTP test script saved on TD at run-time
    Suppose I have a test case saved on TD in the following folder structure-

    Final\Result\Test1

    What code should I write in my script so that I get the path of the folder where my script is kept at run-time

    Thanx in advance.

  2. #2
    Senior Member
    Join Date
    Feb 2005
    Location
    Israel
    Posts
    105
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: get the folder path when QTP test script is saved on TD

    I'm not sure I understand, but if you meant that you need to get the path of the test from withing the test itself, you can use:
    PathFinder.Locate(".\")

  3. #3
    Member
    Join Date
    Nov 2004
    Location
    pune
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: get the folder path when QTP test script is saved on TD

    No.This will give me the path set in the folder options..
    I want to get the path at run-time on Test Director.
    Is any function or feature available..
    I m not geting it in Help also.

  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: get the folder path when QTP test script is saved on TD

    Hi,
    use enviornment variable TestDir,
    which gives the folder path of u r current test script.

    Cheers
    Yogi

  5. #5
    Member
    Join Date
    Nov 2004
    Location
    pune
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: get the folder path when QTP test script is saved on TD

    Hi,

    TestDir gives me the path in Temp folder of TD whereas my test case is stored in 'Final\Result\' folder in Test Plan Tab of TD.
    I want to get the folder name 'Final\Result\' at run-time.
    Please suggest

    Thnx

 

 

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 07:46 PM.

Copyright BetaSoft Inc.