bhoppe
15 years agoNew Contributor
Why does object exist in Object Browser but not in test script while debugging
I'm debugging my test script, and break at a point where it checks if a window exists. I delay the script until the window exists:
while(!Aliases["SwitcherProDT"]["WaitWinFormsObject"]("MainWnd", 0)["Exists"])
{
aqUtils["Delay"](500);
}
Its not finding "MainWnd" even after it comes up. So I pause the script at this point. In my watch list I add:
Aliases["SwitcherProDT"]["MainWnd"]["Exists"]
and it shows the value as False. I check the Object Browser and it shows Exists as True. At first I thought it was a mapping issue 'cause in the browser it has it listed as:
- Sys
- ["Process"]("SwitcherProDT")
-["Window"]("WindowsForms10.Window.8.app.0.33c0d9d", "SwitcherPro Desktop - TPS54611 6V to 0.9V @ 0.1A - 2188", 1)
But, the properties for this "Window" as the mapped name listed as Aliases["SwitcherProDT"]["MainWnd"].
So, why does the browser sees that it exists but the script doesn't?
while(!Aliases["SwitcherProDT"]["WaitWinFormsObject"]("MainWnd", 0)["Exists"])
{
aqUtils["Delay"](500);
}
Its not finding "MainWnd" even after it comes up. So I pause the script at this point. In my watch list I add:
Aliases["SwitcherProDT"]["MainWnd"]["Exists"]
and it shows the value as False. I check the Object Browser and it shows Exists as True. At first I thought it was a mapping issue 'cause in the browser it has it listed as:
- Sys
- ["Process"]("SwitcherProDT")
-["Window"]("WindowsForms10.Window.8.app.0.33c0d9d", "SwitcherPro Desktop - TPS54611 6V to 0.9V @ 0.1A - 2188", 1)
But, the properties for this "Window" as the mapped name listed as Aliases["SwitcherProDT"]["MainWnd"].
So, why does the browser sees that it exists but the script doesn't?