Forum Discussion
Thanks.
1/
I do :
Sys.WaitProcess("MyProcess", 1000, MyIndex).Refresh
It works better, but there is again problem sometimes.
Is it better to do :
Sys.Refresh()
?
2/
In list of objet, there are :
Sys.Process("MyProcess").Window("TfrmMain", "***", 1)
instead of :
Sys.Process("MyProcess").VCLObject("frmMain")
Why the difference?
- Colin_McCrae9 years agoCommunity Hero
Not sure.
I tend to use the generic sys.refresh as it doesn't seem to come with any discernable overhead.
I notice you're using a Delphi application? I'm working on Delphi stuff at the moment and I'm finding that a lot of it is data driven and takes a second or two to retreive, populate, and render (especially grids, trees and popup menus). You may need to use some helper functions that loop over the object checking for population or something along those lines?
- ChrisPro9 years agoContributor
I do a loop in object process and each lopp i do refresh.
Bu there is the problem.
An idea?
- joseph_michaud9 years agoModerator
Are you using Delphi XE8?
- kirk_bottomley9 years agoContributor
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?
- ChrisPro9 years agoContributor
I have the same problem. I use "Delphi XE2".
A solution to correctly refresh?