write vbscript on veb applications in qtp with exapmles?



write vbscript on veb applications in qtp with exapmles?..

Answer / nanda

Do u want simple script....

For Login ....

browser("XXXX").page("XXXX").webedit("hgshad").set "hdsfajf"
browser("XXXX").page("XXXX").webedit("dsadsagd").set "dlskajdl"
browser("XXXX").page("XXXX").webImage("dasada").click

to count No. Of Links in WebPage..

set objlink = description.create
objlink('html tag").value = "A"

set n = browser("XXXX").page("XXXX").childobjects(objlink)

c = n.count

msgbox c

like this we write script for testing web applications..
these are the sample scripts only...

If any queries..
nanda.dreddy@gmail.com

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Which function is used to accesses the Properties from Repository Pls anybody can give the answer.. Thanks in advance...

2 Answers   Navis,


can any one tell me what is syntax error in line msgexist=Browser("title:=Gmail: Email.*").Page( "title:=Gmail: Email .*").WebElement(innertext=&msg).exist 'code ************** Call login("lal="," " ) wait(5) Call errormsg("Invalid email address. [?]" ) Function errormsg(msg) msgexist=Browser("title:=Gmail: Email.*").Page( "title:=Gmail: Email .*").WebElement(innertext=&msg).exist if msgexist then Reporter.ReportEvent micPass,"enter valid username or pwd ",msg else Reporter.ReportEvent micFail, "entered valid uname and pwd",msg end if End Function

5 Answers  


Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?

0 Answers  


One build is delivered. in that build button name is submit. but in the next buit that name of the button changed as login.are u continue with previous recorded script or u make any changes?

6 Answers   Covansys,


what is meant by descriptive programming?

2 Answers   Wipro,


In how many ways we can add check points to an application using QTP.

4 Answers  


how we can take data in the username field text box into variable in web application explain with example and give all functions to get data into variables

6 Answers   iton, TATA,


tell me the script for envirnment value parameeter with an example. which situation envirnment valu parameter is used

2 Answers   HCL,


I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me

0 Answers  


whai is meant by automation testing?

6 Answers  


What are the types of Object Repository’s in QTP?

2 Answers   Crea,


WHAT ARE THE SHORTCUT KEYS IN QTP?

4 Answers   TCS,


Categories