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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?

1431


In qtp, how you can exit for loop?

533


Explain the concept of object repository & how qtp recognizes objects?

579


Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)

1631


How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object

2535






How do you synchronization point through DP?

608


Hi, I am using 2 excel sheet.First excel sheet works fine with the script, if it opens the 2nd excel sheet,it works fine,but after finish all the rows it is giving the following error in the following line. InValid Procedure call or argument Line (178): "Browser("name:="&result,"application version:=internet explorer 7").Page ("title:=bgt.*", "index:=0").WebList ("name:=SearchType","html id:=Select1","location:=0").Select SearchType1". I have seen a web article says that,If we use any vbscript friendly name it may gives the above error-Invalid procedure call or argument not sure,Am I using any VBScript frienlyName? in the above line? [but the same line is perfecly working for first Excel ] It is little urgent. Any Help Thanks you

1451


Can we create user defined functions in qtp?

566


Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks

1424


how to know no.of mails in our g mail by using vb-script

1787


Which scripting language used by quicktest professional?

544


How can i check items sorted or not in a weblist ? Give me the script for this...

1588


Where we can use the analog mode and where we can use the low – level mode?

576


What is the basic concept of quicktest professional (qtp)?

588


Why is Client side image is preferred over server side image?

1450