Numbers added to object names
I am getting frustrated with JavaStar. I try to test an application and am not able to playback my recorded scripts.
When I examine my scripts I find the following:
** script one:
JS.lookup(''EwtComponent50'').member(''oracle.ewt. lwAWT.LWButton'', 0).mousePressed(11,9,16);
** script two:
JS.lookup(''EwtComponent51'').member(''oracle.ewt. lwAWT.LWButton'', 1).mousePressed(30,6,16);
** script three:
I presume, that the added numbers are somehow used to find the objects in the applet. When I playback the script the objects have other numbers and therefore cannot be found.
I always get a ''java.lang.NoAppResp'' error (2).
Any suggestions how to resolve this behaviour are greatly appreciated?
PS: Development is done under JDK 1.1.7B and JavaStar 1.2 (12/16/1998) with Oracle's EWT (Extended WT)
Re: Numbers added to object names
I had the same problem. Your application programmers can solve the problem. They should use or override the setName-method of the components to be tested by javastar.
There exist some complex java-component-hierarchies with dynamic allocation of subcomponents. The default naming behaves in the way you described it.
Another way, I did not try, might be:
- click on a coordinate on the toplevelframe (window) with a constant name
- do your action, e.g. textinput
Note, this is not the way javastar handles recordings. You have to program it yourself.