robert_L
11 years agoOccasional Contributor
Java Sys.Process object ID change
Hello,
I initially identified, via TestComplete ObjectSpy, a Java Security Warning popup as:
Sys.Process("java").SwingObject("JDialog", "Security Warning", -1, 1).SwingObject("JRootPane", "", 0)...
I would then use this "object ID" in my script to process this object.
However, in recent runs, the object ID has changed to:
Sys.Process("java", 2).SwingObject("JDialog", "Security Warning", -1, 1).SwingObject("JRootPane", "", 0)...
Why did this change, and how do I handle this variation in my JScript code?
Thanks in advance for your help,
Robert
I initially identified, via TestComplete ObjectSpy, a Java Security Warning popup as:
Sys.Process("java").SwingObject("JDialog", "Security Warning", -1, 1).SwingObject("JRootPane", "", 0)...
I would then use this "object ID" in my script to process this object.
However, in recent runs, the object ID has changed to:
Sys.Process("java", 2).SwingObject("JDialog", "Security Warning", -1, 1).SwingObject("JRootPane", "", 0)...
Why did this change, and how do I handle this variation in my JScript code?
Thanks in advance for your help,
Robert
- This will change if you have multiple forms with the same name, or in this case, duplicates of the same popup window. You can omit the ID but more than likely you didn't expect multiple popups here so you'll want to find out why you have 2 of them open and add handling for that.