[1.1.4] Linux: unable to find window with App created with process path

Bug #1813493 reported by spikedboy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
New
Undecided
Unassigned

Bug Description

When doing

App app = new App("/path/to/process");
app.setPid(15081);
app.focus();

Produces the following:

[AppLog] App.focus: no window for [15081:process ()] /path/to/process

And the window cannot be acted on.

Revision history for this message
RaiMan (raimund-hocke) wrote :

--- app.setPid(15081);
... is not official API

The pid should be evaluated and set internally

the correct usage would be
app.open();

... but this does not seem to work (see other bug 1813491)

Hence I will change this bug to be a duplicate.

Revision history for this message
spikedboy (spikedboy) wrote :

Hi RaiMan, thanks for looking at this and the other issues I reported.

I appreciate your work with Sikuli.

Got a question regarding this one.

I am always looking at the java API for Sikulix. When I look at App's class methods, setPid is a public and available method with no other regards. How would I as a developer know I am not supposed to use it?

Cheers!

Revision history for this message
RaiMan (raimund-hocke) wrote :

--- How would I as a developer know I am not supposed to use it?
I admit, that as a developer working against the SikuliX Java API, you see more, than you should ;-)

The problems currently you might get are caused by
- lack of inline documentation
- those "internal" API methods might not be stable due to continuous revision of this App class

Only the high level features like open, close, focus, isRunning, ... mentioned in the scripting docs are somehow guaranteed.

As a short-term solution I will add a this-is-official-API marker to the respective classes/methods, so every item, not having this marker is not official and unsupported, but can be used at own risk.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.