In a yahoo web Application there are 65 links.one day it
will opens 50 links and another day it will open 55
links.In this scenerio write Descriptive programing for
Automation?....Pls write the code for this scenerio.



In a yahoo web Application there are 65 links.one day it will opens 50 links and another day it wi..

Answer / gaurav anand

for that page, use description.create() to get an object and then use that object to assign a "micclass" value i.e. in this case is links. then, count the no of links using count(). then store this in a variable and use a for loop to work on these links.

set a = description.create()
a.("micclass").value=links
for(i=0;i<a.count,i++)
set b= browser("").page("").childobjects(a)
-----use b as an object to do whatever you want to do on a link-----
next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How do you convert manual test cases to automated test cases?

0 Answers  


MANUAL TESTING, AUTOMATION TESTING QTP,QC , Load Runner , SELNEIUM ONLINE TRAINING

0 Answers  


i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression

0 Answers  


I am testing a website TheLancet in qtp 9.2 and running a script but its not working.Tell me if m doing anything wrong in the script. If Browser("TheLancet.com - Home Page").Page("TheLancet.com - Home Page").Link("Clinical").exists then msgbox "object exist" Else msgbox"object doesnt exist"

2 Answers   Rolta,


1)what is the Exact Meaning of Environment Variables? 2)what is Compile Module in QTP? what exactly it contains Functions or Actions?

4 Answers  






i am giving.multiple names like ram,raj,san etc....pls enter & search these names in google pade edit box through script... i told to interviewer, using Ms excel & test easily..but interviwer not happy with that answer?

2 Answers   Accenture,


what is main difference between QTP 8.2 AND QTP 9.0/9.2 HOME PAGE?i mean what are extra thing in QTP 9.0 than in QTP 8.2?

1 Answers   Infosys,


How can you identify the browser and its information using QTP script?

0 Answers  


How to record right click of a context menu and click on the selection ?

3 Answers  


Why to use descriptive programming?

0 Answers  


How many lines of code in each script of QTP?

0 Answers  


How to perform action on objects, If two objects have the almost the same name ? example : Object 1 : "Entry of Items" Object 2 : "Items" Whenever I ask QTP to perform an action on Object 2 it performs action on Object 1. Note: The two objects are present in an Oracle Application tree.

2 Answers   Wipro,


Categories