working with multiple AUTs using jubula java api [message #1706713] |
Sat, 29 August 2015 04:06 |
geetha nirmal Messages: 3 Registered: July 2015 |
Junior Member |
|
|
Hi,
i am trying to launch two applications using jubula in java and work between them.
these are the steps i follow
> start the aut agent
> launch app1 (takes more time to launch)
> hence wait for a home button to appear
>click on that button
>launch app2
>click on a button in app2
all the steps run fine except the last. I get the exception org.eclipse.jubula.client.exceptions.ComponentNotFoundException
i believe the AUT agent is still looking for the component with first application.
I tried disconnecting the first aut also using two autagents (60001 and 60000) for each application. but something is stopping to create two separate threads
below is the code i use.
Any input would be of great help.
AUTAgent autagent = MakeR.createAUTAgent("localhost",60001);
autagent.connect();
AUT RAUT = null;
AUT SAUT = null;
ComponentIdentifier CC;
ButtonComponent Button;
AUTConfiguration autconfigurationR = new SwingAUTConfiguration("R",
"R",
"runlocal.bat",
"C:\\POSrewrite",
null,
Locale.getDefault());
AUTConfiguration autconfigurationS = new SwingAUTConfiguration("S",
"S",
"runsimulator.bat",
"C:\\POSrewrite",
null,
Locale.getDefault());
AUTIdentifier R = autagent.startAUT(autconfigurationR);
if(R!=null){
RAUT = autagent.getAUT(R, SwingComponents.getToolkitInformation());
RAUT.connect();
}else{
System.out.println("AUT start has failed");
}
CC = OM.objectMapping.get("btnSales");
Button = SwingComponents.createAbstractButton(CC);
boolean proceed = false;
while(!proceed){
try{
RAUT.execute(Button.checkExistence(true), "jubula");
proceed = true;
}
catch(Exception e){
proceed = false;
}
}
Thread.sleep(5000);
RAUT.execute(Button.click(1,InteractionMode.primary), "jubula");
AUTIdentifier S = autagent.startAUT(autconfigurationS);
if(S!=null){
SAUT = autagent.getAUT(S, SwingComponents.getToolkitInformation());
SAUT.connect();
}else{
System.out.println("AUT start has failed");
}
CC = OM.objectMapping.get("btnPrint");
Button = SwingComponents.createAbstractButton(CC);
Thread.sleep(10000);
SAUT.execute(Button.click(1,InteractionMode.primary), "jubula");
RAUT.disconnect();
SAUT.disconnect();
autagent.disconnect();
System.out.println("Done");
Thanks
Geetha
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04475 seconds