SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Mar 2009
    Location
    Katowice, Poland
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Problem with generating guid

    Hi,
    Does anybody know how to generate GUID using JScript in TestComplete?

    Any help will be appreciated,

    Regards,
    ----------
    MT
    ----------

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Location
    Poznań, Poland
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with generating guid

    I think TC do not have such feature. You can implement it youself based on timestamp and random values. You can also use database features if you have one. For example if you have oracle database you could connect to it and generate guid using sys_guid() function:

    select sys_guid() from dual
    regards,
    Lukasz Morawski, QA Engineer
    Cognifide testing blog
    PTaQ

  3. #3
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with generating guid

    Hi,

    Here's a script demonstrating how you can do this:
    <font class="small">Code:</font><hr /><pre>
    function CreateGUID()
    {
    var TypeLib = new ActiveXObject("Scriptlet.TypeLib");
    Log.Message(TypeLib.Guid.substr(1, 36)); // XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    // -- or --
    //Log.Message(TypeLib.Guid.substr(0, 38)); // {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
    }
    </pre><hr />

    Also, you can add the StringUtils script extension to your project and call the CreateGUID method. See this article.
    Jared - AQA Support

 

 

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 02:36 AM.

Copyright BetaSoft Inc.