Can any one give me some basic VB script used in QTP ?As i
am new in QTP.Give sample VB script used in QTP? PLZ

Answers were Sorted based on User's Feedback



Can any one give me some basic VB script used in QTP ?As i am new in QTP.Give sample VB script use..

Answer / dhana

first of all u need to add Objects in u r Application on
which u want to perform Operations to Object repository.

For ex:u need to Add Browser,Page,Frame,Webedit
(Username,Password),webbutton objects to objectRepository
then once u write "Browser" in Expert view,QTP
automatically vl popup the Browsername so as for page and
for Subsequent objects also...


for ex:

Browser("Browsername").Page("Pagename").frame
("Framename").webedit("Username").set 12345

Browser("Browsername").Page("Pagename").frame
("Framename").webedit("Password").setsecure asdahsxcasjd2362

Browser("Browsername").Page("Pagename").frame
("Framename").webbutton("Login").click

Is This Answer Correct ?    4 Yes 1 No

Can any one give me some basic VB script used in QTP ?As i am new in QTP.Give sample VB script use..

Answer / mike w.

An EXCELLENT resource is http://www.w3schools.com/VBscript/default.asp

Is This Answer Correct ?    1 Yes 0 No

Can any one give me some basic VB script used in QTP ?As i am new in QTP.Give sample VB script use..

Answer / dhanapal

Dim - For variable/object declaration
set - assigning value to the variable/object/property.
Ubound - upper bound value of an array.
Lbound - lower bound value of an array.
len(var_name) - to find the length of the variable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How to handle exception when data table is not available in local host system or path is not correct(explain statement with example)

1 Answers  


Kindly help me with the following queries.. -- How to recognize webtable using QTP and how to use it? -- How would one conclude that it is a web table -- For Example, if there is a web table and I am clicking on say Cell A1, how would i know that i've clicked on cell A1 -- Kindly suggest me to use the web table better

1 Answers  


What is the syntax for how to call one script from another?

0 Answers  


What is difference between web object and web items

2 Answers   Patni,


What is the disadvantage of smart identification?

3 Answers   Infosys, Sony,






what is main diff of qtp8.2 and qtp9.0?

1 Answers   Covansys,


Write VB script to test given number is Prime Number

5 Answers   Oracle,


Hi Suppose u have complex Test scripts which u vl write first and which u vl execute first

2 Answers   Symphony,


What are accessibility check point and xml check point?

5 Answers   IBM,


Difference between test object and run time object?

0 Answers  


Can we record a video in qtp recording??

1 Answers   BirlaSoft,


what is difference betweem class annd object?

1 Answers  


Categories