Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » working with multiple AUTs using jubula java api(working with multiple AUTs using jubula java api)
working with multiple AUTs using jubula java api [message #1706713] Sat, 29 August 2015 04:06 Go to next message
geetha nirmal is currently offline geetha nirmalFriend
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
Re: working with multiple AUTs using jubula java api [message #1764057 is a reply to message #1706713] Wed, 24 May 2017 13:06 Go to previous messageGo to next message
Samed Sivaslioglu is currently offline Samed SivasliogluFriend
Messages: 3
Registered: May 2017
Junior Member
Did you figured it out? I have the same problem
Re: working with multiple AUTs using jubula java api [message #1764378 is a reply to message #1764057] Mon, 29 May 2017 09:54 Go to previous messageGo to next message
Miklos Hartmann is currently offline Miklos HartmannFriend
Messages: 9
Registered: June 2016
Junior Member
Hi Geetha and Samed

Currently some members of the team are on holiday, so our response time is longer, but I'll try to have a look at this problem by next week the latest.

Best wishes,
Miklos
Re: working with multiple AUTs using jubula java api [message #1765422 is a reply to message #1764378] Fri, 09 June 2017 10:45 Go to previous messageGo to next message
Miklos Hartmann is currently offline Miklos HartmannFriend
Messages: 9
Registered: June 2016
Junior Member
Hi Geetha and Samed

Unfortunately I didn't have enough time to have a proper look on the problem yet.
Re: working with multiple AUTs using jubula java api [message #1765527 is a reply to message #1765422] Mon, 12 June 2017 06:44 Go to previous message
Miklos Hartmann is currently offline Miklos HartmannFriend
Messages: 9
Registered: June 2016
Junior Member
Hi Geetha and Samed

Jubula does not support testing multiple AUTs from a single JVM. The best you can do is to continuously connect - disconnect to the relevant AUT, but you must also activate it in this case by clicking inside its window (if the other AUT's window covers it, then other AUT-internal methods may be needed, e.g. for minimizing the other, or activating the current AUT). Note that connecting to an AUT is fairly time-consuming, so this approach has its own drawbacks.
Previous Topic:press "Start AUT" and get '5009: AUT start failed No valid Java binary found.'
Next Topic:Fail to communicate with remote aut
Goto Forum:
  


Current Time: Wed Nov 21 02:46:03 GMT 2018

Powered by FUDForum. Page generated in 0.02539 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top