There was an interesting issue identified, that Win Runner with 1.5 Java Plugin is able to sense 1st window but not the second. It works well if the tool is executed for second time.
Win Runner was launching the Java application and tries to sense a window and its controls. The Java application was using 1.5 private JRE. Private JRE is nothing but bundling a separate copy of JRE along with an application. Public JRE is the one (but mostly many versions of it) available in C:\Program Files\Java\ folder.
Java 1.5 and later versions come with a feature for quick startup. This feature does have a penalty at the first run while creating a jsa file required for quicker startup in later runs. In the context of the issue, the Java application was taking time to show the first window. The Win Runner script used for detecting the window was able to wait and detect it. But there was a time gap for showing second window. In this period Win Runner detection API comes out with -1 (unknown error). After investigation, the first JVM launches another JVM and when there is a point where no JVM is available for Win Runner Java Plugin to work with, it is skipping the process of detecting the Java window by returning -1. There are many valid error return values for the detecting API but -1 is not part of it and code gets skipped in the execution flow.
Adding a validation for -1 and looping the check until some time frame resolved the issue. Looping is important here as Win Runner APIs do have timeout argument. But will not be effective as there is no JVM attached.
Monday, February 25, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment