Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gathering certain child objects
#3
Not Solved
(Just had some help over at the HP Forums)

Here is the NEW code I am now using:
===========================================

Code:
Dim oDesc 'Description Object
Dim colObject 'Object Collection

Set oDesc = Description.Create
oDesc("micclass").Value = "WebElement"
oDesc("html tag").Value = "SPAN"
oDesc("x").Value = 180
oDesc("innertext").Value = ".*[^LCP]"

Set colObject = Browser("micClass:=Browser").Page("micClass:=Page").ChildObjects( oDesc )

'Retrieve the count
iCount = colObject.Count

msgbox iCount
'Count is now coming back with "2", which is correct

============================================

But now I have another question.

I was just told by a team member to NOT use the x value as a filter, but instead use the instr function.

I could just iterate through the child objects using an index and exclude them if their innertext contains LCP and I could do that with the instr function.

Problem is I don't know much about instr functions. I will do some searching on the web, unless someone here would like to give me a head start on it.

Thanks,
SBsteven
Reply


Messages In This Thread
Gathering certain child objects - by SBsteven - 11-13-2009, 10:13 PM
RE: Gathering certain child objects - by SBsteven - 11-14-2009, 12:16 AM
RE: Gathering certain child objects - by SBsteven - 11-14-2009, 01:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SwfTreeview - Color validation for child item YogeshCallappa 0 2,295 11-10-2016, 04:55 PM
Last Post: YogeshCallappa
  Driver Script to control child scripts sumanhyd 1 3,191 07-26-2016, 07:06 PM
Last Post: Ankesh
  UFT 12.50 unable to recognize child objects from a Dialog Class in Firefox jesusisaac 1 3,812 08-20-2015, 11:39 PM
Last Post: ADITI1992
  Child object shwetakondekar 0 2,141 07-01-2015, 03:28 PM
Last Post: shwetakondekar
  How to write a script for fly out menus (Parent - Child - Sub Child) rajkumarsm 3 4,733 09-02-2014, 10:01 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 3 Guest(s)