we have a link in a website or webtable How can we record
link in that table or site? link is not static we don't
know exact location of that link? how ? if u know pls give
reply with script also?

Answer Posted / jyotikrushna mohapatra

I just saw an answer which has mentioned above as:

rowcount=b().p().webtable().rowcount()
for i=2 to rowcount
set obj_lnk=b().P().Webtable().childitem(i,j,"Link",0)
obj_lnk.click

but this isn't 100% appropriate code, the script may fail
why
Ex: here we are trying to click on the link through every
row of the webtable, suppose the 3rd row doesn't contain
any link then "obj_lnk.click
will fail because there is no link present in that row so
the exact and write code will be as :

rowcount=b().p().webtable().rowcount()
for i=2 to rowcount
if b().pa().webtable().childitemcount(i,j,"Link",0)<>0
then
set obj_lnk=b().P().Webtable().childitem(i,j,"Link",0)
obj_lnk.click
end if
end for

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.

527


Limitations in QTP?

1737


Where to use Property Let, Property Get, Property Set in UFT

370


How many types of Automation frameworks are there in UFT? Describe them.

556


How to find the difference between 2 dates in qtp?

576






Hi, My name is kishan. I have good Conceptual Knowledge on QTP. In order to Boost up my Confidence Level, I want to do a Project oriented Training only on QTP in Hyderabad. Kindly Let me know which is the Best QTP Project Training Institute in Hyderabad. Thanks in Advance kishan

2056


Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?

1858


Key word driven framework

1682


In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail

1499


How to associate function library at a run time?

700


What are the properties you would use for identifying a browser and page when using descriptive programming?

627


How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?

1274


How do know the number of browsers opened?

622


Is QTP supports Unix. If yes, then how the test automation is done?

1722


In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?

561