Forum Discussion
Aurelien
15 years agoContributor
Hi Jared,
I am newbie so I will try to answer the best:
There was no error in my TC (the code just wait then continue). I am using WaitWinFormsObject to wait until the object existed before to continue the code. I know the object exist since I can see it but my syntax must be wrong since TC doesn't see it.
I am sorry if I don't answer all your questions correctly but I am not sure to understand what you need (target object?):
"Also, can you post here the exact code which obtains the target object, not just the WaitWinFormsObject call?"
My code that I reduced to simple expression:
Option Explicit
Function TB_Click_PlatformSettings_In_Tools
Dim ListViewTools, ItemCount, x, intImageIndex, WinPlatformSettings, toto
log.message NameMapping.Sys.Metrino_Kernos_ControlPanels_PlatformSettings.PlatformSettings.WaitWinFormsObject("PlatformSettings", 1000).exists
End Function
The result value is "False".
Since the exact name is "WinFormsObject("PlatformSettings")" I believe I should write:
log.message NameMapping.Sys.Metrino_Kernos_ControlPanels_PlatformSettings.PlatformSettings.WaitWinFormsObject("WinFormsObject("PlatformSettings")", 1000).exists
But then I got an error syntax and I am not able to run unit.
I tried wildcard like this WaitWinFormsObject("*(PlatformSettings)*", 1000).exists
But doesn't work too.
Thanks you for your support.
I am newbie so I will try to answer the best:
There was no error in my TC (the code just wait then continue). I am using WaitWinFormsObject to wait until the object existed before to continue the code. I know the object exist since I can see it but my syntax must be wrong since TC doesn't see it.
I am sorry if I don't answer all your questions correctly but I am not sure to understand what you need (target object?):
"Also, can you post here the exact code which obtains the target object, not just the WaitWinFormsObject call?"
My code that I reduced to simple expression:
Option Explicit
Function TB_Click_PlatformSettings_In_Tools
Dim ListViewTools, ItemCount, x, intImageIndex, WinPlatformSettings, toto
log.message NameMapping.Sys.Metrino_Kernos_ControlPanels_PlatformSettings.PlatformSettings.WaitWinFormsObject("PlatformSettings", 1000).exists
End Function
The result value is "False".
Since the exact name is "WinFormsObject("PlatformSettings")" I believe I should write:
log.message NameMapping.Sys.Metrino_Kernos_ControlPanels_PlatformSettings.PlatformSettings.WaitWinFormsObject("WinFormsObject("PlatformSettings")", 1000).exists
But then I got an error syntax and I am not able to run unit.
I tried wildcard like this WaitWinFormsObject("*(PlatformSettings)*", 1000).exists
But doesn't work too.
Thanks you for your support.