Tuesday 30 July 2013

Explain typename function in QTP.

Typename function is useful when you want to know the data type of the variable.

Vb script is a scripting language used in QTP. All variables used in QTP are by default variant.
When we assign a value to variable, its data type changes.

For example -
print typename(a)  'Empty

a=10
print typename(a)  ' Integer

a=10.2
print typename(a) 'Double

a="sagar"
print typename(a)  'String

a=null
print typename(a) 'Null

This is how we can use the typename function in QTP to find the current data type of the variable.


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.