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
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.
Limitations in QTP?
Where to use Property Let, Property Get, Property Set in UFT
How many types of Automation frameworks are there in UFT? Describe them.
How to find the difference between 2 dates in qtp?
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
Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?
Key word driven framework
In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail
How to associate function library at a run time?
What are the properties you would use for identifying a browser and page when using descriptive programming?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
How do know the number of browsers opened?
Is QTP supports Unix. If yes, then how the test automation is done?
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?