Thursday, 25 July 2013

How to load ini file in QTP

Ini files are used to store global data required for testing.

Typical ini file looks like this.

[Environment]
                URL=http://xyz.com
                UserId=abc
                Password=pass

 [Environment]


Example - 

To load above ini file in QTP script, you have to use below lines of code

Environment.LoadFromFile “c:\Environment_Variable\Env.ini"

Print  Environment.Value("URL")

This is how you can read values from ini file in QTP.


Please give your inputs, suggestions, feedback to Us. We value your thoughts.

No comments:

Post a Comment

Please Leave your reply. We value your feedback and inputs

Best QTP Books

Everything About QTP

Hello Friends,
You can find QTP study material, Multiple choice questions (mcq), QTP question bank, QTP question papers, QTP notes, QTP questionnaire, scenario based QTP interview questions, QTP tutorial and QTP training on this site.

If you are a fresher or experienced QTP professional with (1/2/3/4) years of experience, this blog is just for you.