Hi,

I am new to QTP and vb.script.How to start to write
vb.script in QTP? Please give me suggestions?

Answers were Sorted based on User's Feedback



Hi, I am new to QTP and vb.script.How to start to write vb.script in QTP? Please give me sugg..

Answer / kondalu

for example: calculator(table as form1) boxes in editbox as
the value1 and value2 and result,buttons as the
add,sub,mul,divide ,clear this in application vbscript
given bellow

vbwindow("form1").Vbedit("value1").set "10"
vbwindow("form1").vbedit("value2").set "20"
vbwindow("form1").vbbutton("add").click
vbwindow("form1").vbbutton("sub").click
vbwindow("form1").vbbutton("mul").click
vbwindow("form1").vbbutton("divide").click

Is This Answer Correct ?    10 Yes 2 No

Hi, I am new to QTP and vb.script.How to start to write vb.script in QTP? Please give me sugg..

Answer / satyanarayana

Hi dear it is very easy to write vb scripting.
First of all we have to understand what the actions to be
performed by us on the application.
Actions means entering a value or clicking a button or
selecting a value from a list dropdown list or selecting or
deselecting a check box.
example for a edit box
Browser("browsername").Page("pagename").Webedit("username").set"satyanarayana"
like the above for buttons .click
for list boxes .select"satyanarayana"
for radio buttons .set
for check boxes .set"on/off"

Is This Answer Correct ?    5 Yes 1 No

Hi, I am new to QTP and vb.script.How to start to write vb.script in QTP? Please give me sugg..

Answer / geena

Do record and play. U will understand how the script
appear. Then try.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How to recognize and read data from pdf file using Descriptive Programming in QTP?

1 Answers   Satyam,


hi, In A Table there are some columns and dynamic rows and in each row in first column there is a link with name. upon clicking on that link it will show some details. write the vbscript to check that link without descriptive programming?

2 Answers   HealthAsyst,


Can anyone explain about Keyword driven framework in detail and how to use it in case of any project

4 Answers  


How you can decide which type of object repository you have to use?

0 Answers  


What exactly is the difference among all the three recording modes.

5 Answers   Accenture,






Can we add the function library directly from scripting in qtp instead of adding from resource tab?

5 Answers   IBM,


in real time when we are creating the script by default it is going to save in action object repository or not any way my question is in one of my interviewer said that in real time the default object repository is action object repository and by using quick test plus they are going to merge is it correct i said that by selecting the object repository as shared one in selecting the test>>settings>>resources but she is not convinced what is the correct one

1 Answers   DigiTech, Infotech,


wht type of User defined functions or Java Releated functions Do we write in VB scripting

0 Answers  


Please let know the scripts for counting number of repeated letters in the word. Note repeated letter should not be count agian. Ex: If "Hello" is my word... l is coming twice.. it should count once and print... secong 'l' should not count again..

5 Answers  


Explain in brief about the QTP Automation Object Model.

1 Answers  


Write a QTP script to print all the link names displayed in a web page

4 Answers   TCS, Virtusa,


What is QTP’s model for test creation?

0 Answers  


Categories