Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send an object name (followed by a number) to ChildObjects?
#1
Solved: 11 Years, 4 Months ago
In a function I have created four objects called oLevel1, oLevel2, oLevel3, oLevel4. In each iteration/step of a For-Next loop I want to list the child objects of each of the objects. However I'm not sure how to do this.

When I try to send the following concatenation (of oLevel+number) to ChildObjects I get an error at the ChildObjects line:
Code:
Set oLevel1 = Description.Create()
...
For Iterator = 1 To 4  Step 1
   nLevel = 1
   Set List = parentFrame.ChildObjects(oLevel & nLevel) 'get childs from e.g. oLevel1 object
   ...
   nLevel = nLevel + 1
Next
...
Is there a way to send in an object called "oLevel1" to ChildObjects in the first iteration and "oLevel2" in the second iteration etc, i.e. concatenate "oLevel" with the nLevel number before sending it?

/MGMN
Reply


Messages In This Thread
Send an object name (followed by a number) to ChildObjects? - by MGMN - 09-23-2008, 09:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 583 11-05-2023, 03:55 PM
Last Post: lravi4u
  Send automatic email notification when test run started helmzshelmz 0 1,068 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  Web Object Unique ID Number zunebuggy 0 1,556 07-10-2017, 05:37 PM
Last Post: zunebuggy
  To send Fail Results to mail Naresh 1 2,532 04-23-2015, 08:30 PM
Last Post: babu123
  To send the QTP Results to mail using Thunderbird Naresh 0 2,398 04-03-2015, 03:19 PM
Last Post: Naresh

Forum Jump:


Users browsing this thread: 1 Guest(s)