QTP : Web table objects are not counted in the run time

Hi,

I have n number of links in my webtable, these links will be change based on some conditions
first condition this webtable links count is correct
But second condition it display wrong count.

Condition and display links are correct.

But webtable links are not counted correctly, i cant find the resion for this.

Have any idea for this problem?

Thx

Punitha.

Questions by Punitha.R   answers by Punitha.R

Showing Answers 1 - 4 of 4 Answers

ManjuPillae

  • Mar 26th, 2008
 

We can count the number of links that are present in the web table, using Descriptive programming.

Set Lnk = Description.Create()
Lnk("micClass").Value = "Link"

Set LnkPres = Browser().Page().WebTable().ChildObjects(Lnk)

LnkCnt = LnkPres.Count
MsgBox "Total Links Present in WebTable are" & LnkCnt

If you want to count links present in the webtable as per my knowledge you need to used childitems concept not child objects.

set obj_lnk=description.create
obj_link("micclass").value="Link"
lnk_cou=browser().page().webtable().childitems(obj_lnk).count
msgbox lnk_cou

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions