Micro Focus QTP (UFT) Forums

Full Version: To click and verify the links with + mark
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

We have + link/image in our application all these comes under a webtable column and these images are having same properties once we click on it expands.Attached is the screen shot for it.here sometimes
+0/0(0%) also will be there i dont want to click such images how to verify these kind of objects.I should be able to loop on each item in that column any first occurence which is not of 0 i want to click.So how can we do this..

Any help would be appreciated in advance..

Thanks
HI,

Try with below steps :
step1: Get the rowcount of the Webtable into a variable.(say 'rc')
step2: Use the 'For' Loop & get the required cell data into Variable(say 'linkval')
step3: check the link name is not equal to +0/0(0%) & then click on that link.

Ex:
Code:
rc=browser(..).page(..).webtable(..).rowcount

for i=1 to rc
linkvall=browser(..).page(..).webtable(..).getcelldata(i,3)

if linkval<> "+0/0(0%)" then
   browser(..).page(..).webtable(..).childitem(i,3,"Link",0).click
end if
next
Hi

I was able to click on + Image now the problem is once i click on + image it expands and shows the many links.How do i click i tried by giving indexes it clicks some other link.