Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with Webelement's
#1
Not Solved Big Grin 
I have a webtable with 237 rows and 15 columns. In column 2 there are only a list of 237 names but they all have webelement that has a property named HTML id. I would like QTP to run through the webelements property of each name "html id"and see if it's value has "VA" in front of it: the html id has values that looks like the following "HA123456" , "VA123456" or "GO123456" I only want it to list the names that are displayed in the webtable that has a webelement "VA" in the front of it's html id value. Is this possible QTP 9.5?
Reply
#2
Not Solved
Hi Avis,

I had also faced similar scenario sometime before.I am working on version 10 Try this, i am not sure about version 9.5.
please excuse if it won't work for version 9.5,
Code:
For i= 1 To 237
   oCount=Browser().Page().WebTable().ChildItemCount(i,2,"WebElement")
   For j= 1 To oCount
    childObj=Browser().Page().WebTable().ChildItem(i,2,"WebElement",j)
    'You can use the table child object as you want here
    If (InStr(childObj.getROProperty("html id"),"VA")<>0)
     MsgBox childObj.getROProperty("html id")
    End If
   Next
Next
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)