Forum Discussion
AlexKaras
11 years agoChampion Level 3
Hi Sunitha,
Basically, the error message description you've provided tells the most probable reason of the error: either the target object or one of its parents was recreated during the time you've set a reference to the object and used it. Note, that the reason of the error may be recreation of either the object itself or one of its parent object(s).
For example, considering your sample, if you have something like this (pseudo-code):
Set list = page.list
Do
Set div = list.FindChild(someDiv)
div.link.click ' this opens some secondary popup or navigates to some other page
... ' proceed with the secondary popup and close it. Popup closing causes page.list recreation
While Not exitCondition
Then you will get the mentioned error because the list will be recreated (by jscript code on the page or by any other means) and your attempt to search for another div will use invalid list reference. In this case you will need to move Set list = page.list inside the Do loop to set the reference to the new list (even if it visually looks like the old one).
Try to consult with developers or investigate the problematic page to find out if any of the parent object(s) can be recreated between using them in the test code.
Basically, the error message description you've provided tells the most probable reason of the error: either the target object or one of its parents was recreated during the time you've set a reference to the object and used it. Note, that the reason of the error may be recreation of either the object itself or one of its parent object(s).
For example, considering your sample, if you have something like this (pseudo-code):
Set list = page.list
Do
Set div = list.FindChild(someDiv)
div.link.click ' this opens some secondary popup or navigates to some other page
... ' proceed with the secondary popup and close it. Popup closing causes page.list recreation
While Not exitCondition
Then you will get the mentioned error because the list will be recreated (by jscript code on the page or by any other means) and your attempt to search for another div will use invalid list reference. In this case you will need to move Set list = page.list inside the Do loop to set the reference to the new list (even if it visually looks like the old one).
Try to consult with developers or investigate the problematic page to find out if any of the parent object(s) can be recreated between using them in the test code.
Related Content
- 7 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 6 days ago