Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send an object name (followed by a number) to ChildObjects?
#2
Solved: 11 Years, 4 Months ago
One way to do would be by using a case statement. But, if you have more objects this way would become a pain. Since you only have 4 objects you can use this way.

Code:
Set oLevel1 = Description.Create()
...
For Iterator = 1 To 4  Step 1
      Select Case Iterator
             Case 1
                      Set List = parentFrame.ChildObjects(oLevel & nLevel) 'get childs from e.g. oLevel1 object
                       ...
             Case 2
                       Set List = parentFrame.ChildObjects(oLevel & nLevel) 'get childs from e.g. oLevel2 object
                       ...
             Case 3
                       Set List = parentFrame.ChildObjects(oLevel & nLevel) 'get childs from e.g. oLevel3 object
                       ...
             Case Else
                       Set List = parentFrame.ChildObjects(oLevel & nLevel) 'get childs from e.g. oLevel4 object
                       ...
       End Select
Next
Reply


Messages In This Thread
RE: Send an object name (followed by a number) to ChildObjects? - by niranjan - 09-23-2008, 10:04 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,533 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)