SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Read INI file using Silktest

    Is anybody having experience to read data from Ini file and then use it in the data-driven script. For example,
    sIniFile.ini
    [section]
    Var1 = Value1
    Var2 = value2
    Var2 = Value2
    There is IniGetValue (STRING sInifile, STRING sSection, STRING sVar) function in 4Test, but it returns only one value. How can I get all values using loop? FileReadLine () or FileReadValue() would not work for ini file type. Please, give me idea or example.

    Thanks in advance


    ------------------
    Olga
    Olga

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Read INI file using Silktest

    If you want to be able to read all values using loops, you need to have a nice enumerated names for your data.
    Ex: val1, val2...

    pseudo-code
    In silk you can convert almost anything into string, and concate them with other strings.
    curly bracket converts the variable into string.

    ------------------

  3. #3
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Read INI file using Silktest

    goto http://www.qadownloads.com and click the Segue section and download the "INI File Functions"

    These functions should make your life much easier

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  4. #4
    Junior Member
    Join Date
    Mar 2001
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Read INI file using Silktest

    Thanks very much for help. It works perfect!!!

    ------------------
    Olga
    Olga

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 09:17 AM.

Copyright BetaSoft Inc.