title: ObjChildItem.Click() not working properly in a loop
body: <p>I am using UFT One to test a Salesforce Contacts table with two rows that have clickable links, "Jim Bean" and "Marsha Smith". (see attached image). 
  <a href="https://i.stack.imgur.com/SdqaZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SdqaZ.jpg" alt="enter image description here"></a>
  I want to loop through the rows and click on the links and have "ValidateContactProperties" Action get called for each Contact Details page that comes up.</p>
  
  <p>The following code works but ObjChildItem.Click() gets executed only the first time.  Only Jim Bean's contact profile page is displayed, not Marsha Smith's.</p>
  
  <pre><code>For i = 2 to rowCount
  
         Set ObjChildItem = obj(0).ChildItem(i,3,"Link", 0)
  
         ObjChildItem.Click()
  
         RunAction "ValidateContactProperties", oneIteration
  
  Next
  </code></pre>
  
  <p>I can see ObjChildItem has Marsh Smith's URL and info but the page is still displaying Jim Bean's Contact Details page after ObjChildItem.Click() is executed for Marsha Smith. 
  <a href="https://i.stack.imgur.com/tntNm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tntNm.jpg" alt="enter image description here"></a></p>
  
  <p>How can we get Marsh Smith's Contact Details page to come after Jim Bean's?</p>
  
  <pre><code>****** WORKING CODE  *********
  
  I found a solution, it is not elegant but it works.
  
  ----------------- ----   Loop Through Contacts action  -------------------
  
  Set oDesc = Description.Create
  oDesc("micclass").value = "WebTable"
  
  Set obj = Browser("Contacts | Salesforce").Page("Contacts | Salesforce").ChildObjects(oDesc)
  
  If obj is Nothing  Then
      Print "obj does not exist"
  Else
          
      ' get the number of rows in the contacts table
      rowCount = obj(0).GetROProperty("rows")
        
   ' global variable is initially set to 2  
      For i = gloVarIteration to rowCount
             
           If  gloVarIteration &gt; 3 Then
              ' refresh the page if we are not in the first ieration of the loop, otherwise the DOM will gte messed up and UFT won't be able to recognize any objects.
              Browser("Contacts | Salesforce").Refresh()
              wait(5)
              Set obj = Browser("Contacts | Salesforce").Page("Contacts | Salesforce").ChildObjects(oDesc)
          End If
         
          Set ObjChildItem = obj(0).ChildItem(i,3,"Link", 0)
          If ObjChildItem is Nothing  Then
              Print "ObjChildItem does not exist"
          Else      
                 
          ' bring up the Contact profile
          ObjChildItem.Click()
          
          ' call the action to validate Contact profile data values            
          RunAction "ValidateContactProperties", oneIteration
                             
          End  If
      Next      
  End  If
  
  
  
  ---------------  ValidateContactProperties   action --------------------
  
  If  gloVarIteration &gt; 2 Then
      ' refresh the page if we are not in the first ieration of the loop, otherwise the DOM will gte messed up and UFT won't be able to recognize any objects.
      Browser("James Bean | Salesforce").Refresh()
  End If
  
  If Browser("James Bean | Salesforce").Page("James Bean | Salesforce").WebTabStrip("RelatedDetailsNewsMore").Exist(15) Then
  
  .......  do stuff
  
          'increment global variable
          gloVarIteration = gloVarIteration + 1
  
          ' go back to Contacts page
           Browser("James Bean | Salesforce").Back()
  
  End If
  </code></pre>