← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #679437]: Problem with App class in linux

 

Question #679437 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679437

Description changed to:
Hello,

I've started a java project recently, which is sikuli-based. My
environment is ARCH linux + eclipse + sikuli java API + KDE plasma.

Imagepath. Screen class,  mouse.hover(), click() , etc. etc.... all of
that works great. Pretty impressive stuff, I must say.

However, I've spent several hours in order to make the App class to
work, but to no avail. I am a  bit confused, since, according to the
docs, its methods are pretty simple and self-explanatory.... and, well,
Hell take me, but I've not been able to get such a simple piece of code
to work:

---------
App browsy = new App("chromium");
		browsy.open();
		
		
		
		try
		{
			Thread.sleep(3000);
		}
		catch(InterruptedException ie)
		{}
		
		browsy.focus();
		browsy.close();
-------------

Chromium will open in a new window (lo and behold) , which is fine and
ok. But after that, the window will not close. In fact, I cannot seem to
be able to control the app object at all. I mean, for example:

- both isValid() and isRunning() will return false

- close() will do nothing, i.e., I can open a chromium window, but I
cannot close it.

- if you purpousefully take the focus to another window (by simply
clicking on it) , after the trhee second delay, browsy.focus() won't
work either, i.e., the chromium window won't become the front-most
window in the screen.

- getTitle() returns an empty string, getName() returns "chromium".

It seems like, I don't know, like if the app object, once I've called
open() on it, wouldn't be able to "recognize" the chromium window
anymore.

If you  could shed some light on this one, I'd be very grateful !

thanks for your time,

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.