Forum Discussion
I'm having a similar issue, perhaps even the same one.
When I run tests individually, I don't usually have problems. But when I run them all in Organize Tests and run the whole project, sooner or later it will not recognize an object and fail.
I've tried the Sys.Refresh, which as Colin said, has no overhead.
But when I've gone to the Object Browser right after a failure and looked at the object there, the mapped name is blank.
I right-click on the process and do a refresh, which DOES take a while, and the test sees the object again.
Is there a way to do THAT kind of refresh from script? Is the object browser just going out of sync with the name mapping after a while?
I have the same problem. I use "Delphi XE2".
A solution to correctly refresh?
- Colin_McCrae9 years agoCommunity Hero
My stuff is Borland Delphi 6 ..... but with a LOT of custom controls.
Thankfully, most of them are close enough to the standard versions that class mapping them gets me most of the methods and properties I need.
sys.refresh does the trick for me so far. I haven't had any problem with object identification. Most of my issues seem to be around timing of using things as I said due to them having to populate up from a DB. And things like the DB Grids, tree views which use image index value for checkbox statuses, popout menus which go several levels deep but aren't actually linked to each other in anything but the most arbitrary means .... all sorts of fun.
Maybe it's down to the devs here. We have a few that are solely Delphi sepcialists so the object naming is actually pretty good. But the controls themselves are a little wierd compared to what I'm used to from web and .NET stuff.