Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object not found during the 2nd iteration of an Action call in a For loop
#1
Not Solved
I am testing a Salesforce page with two Contacts links on it as shown in the attached mage.
    ]
I have a loop where I click on each Contact link and its info  shows up in the Contact Profile page.
   
I then call an Action to check various values on that Contact Profile page.
Set oDesc = Description.Create
oDesc("micclass").value = "WebTable"

Set obj = Browser("Contacts | Salesforce").Page("Contacts | Salesforce").ChildObjects(oDesc)
rowCount = obj(0).GetROProperty("rows")
For i = 2 to rowCount
       Set ObjChildItem = obj(0).ChildItem(i,3,"Link", 0)
        ' bring up Contact Profile page                                                                                                                                                  ObjChildItem.Click()       

        ' Valdate values on the Contact Profile page     
         RunAction "ValidateContactProperties", oneIteration
            
  Next
      --------           ValidateContactProperties action --------------------

' select the Details tab on a webstrip (I'm using Google Chrome)
Browser("abc").Page("abc").WebTabStrip("RelatedDetailsNewsMore").Select "Details"
........
 'Go back to the previous page. If you remove this code, only the first contact profile will be displayed in the browser.
   Browser("abc").Back

-----------------------------------------------------
The problem is when ValidateContactProperties is run the 2nd time from the loop, the objects on the Contact Profile page are not being recognized. Possibly the DOM is getting messed up.

How can I fix this?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT Tool runs more than one iteration always cthossain 2 3,710 02-12-2017, 01:25 PM
Last Post: cthossain
  login object not found in object repository Akram 2 3,107 06-01-2015, 07:47 PM
Last Post: babu123
  global object which can be called in any action excellentpawan123 2 2,753 04-01-2015, 07:34 PM
Last Post: babu123
  object was not found in the Object Repository reynard 0 6,845 03-17-2015, 10:54 PM
Last Post: reynard
  Function return value is not passed during the 3rd iteration premanand1979 0 2,251 10-16-2014, 09:40 PM
Last Post: premanand1979

Forum Jump:


Users browsing this thread: 1 Guest(s)