Forum Discussion
Hi,
So... Is the problem solved or not?
Thanks,
It's a problem that I want to solve it.
But I have tried some times, it's hard to understand, I get a negative coordinate. If I get the answer, I will notice for it.
- AlexKaras5 years agoChampion Level 3
> Call Aliases.Inventor.MainWindow.MDIClient.Click(Aliases.Inventor.ViewClientArea2.width-25,12)
My wild guess is that the MDIClient object was recreated while test code was using it (for example, the form was closed amd reopened) and thus test code reused it from the cache (see description and code sample in the documentation for the .RefreshMappingInfo() method).
I would try to change the code to this:
Call Log.Message(Aliases.Inventor.MainWindow.MDIClient.Top) ' remove after debug
Call Aliases.Inventor.MainWindow.MDIClient.RefreshMappingInfo()
Call Log.Message(Aliases.Inventor.MainWindow.MDIClient.Top) ' remove after debug
Call Aliases.Inventor.MainWindow.MDIClient.Click(Aliases.Inventor.ViewClientArea2.width-25,12)
and check if it helps.
- Bingo5 years agoContributor
Yeah, I have guess it so I refresh test object's parent. But the object always the same, I don't operate it. And You support a good way for me to debug. I will have a try, thanks!
- AlexKaras5 years agoChampion Level 3
> so I refresh test object's parent.
To say the truth, I am not sure if refreshing parent's objects tree refreshes Aliases cache. That is why I recommended to try to .RefreshMappingInfo() for the object itself.