Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

App.open() not finding an already open window #286

Open
alkhimey opened this issue Oct 3, 2017 · 2 comments
Open

App.open() not finding an already open window #286

alkhimey opened this issue Oct 3, 2017 · 2 comments

Comments

@alkhimey
Copy link

alkhimey commented Oct 3, 2017

The relevant documentaion:

At time of instance creation the process list is scanned for the name of the executable using the given text. If this is found, the app instance is initialized with the respective information (PID, executable, window title of main/frontmost window).

I tried this:

ff = App("firefox")
ff.open()
print ff
ff2 = App("firefox")
ff2.open()
print ff2

Results in firefox being open twice

[log] App.open [6712:firefox]
[6712:firefox ()] firefox
[log] App.open [6716:firefox]
[6716:firefox ()] firefox

OS is Ubuntu 17.4 and installed Sikulix 1.1.0 from apt.

@alkhimey
Copy link
Author

alkhimey commented Oct 3, 2017

In the example, I forgot to wait after opening the first instance. Nevertheless the issue is still valid.

@alkhimey
Copy link
Author

alkhimey commented Oct 5, 2017

@RaiMan

I want to try to solve this. I looked in the code and it seems like a very localized fix in LinuxUtil.java file (as well as the other function like isRunning #276)

I am not very familiar with java build systems though. Is there a better way developing rather than building with maven a package and installing and opening the IDE? I am sure there is more developer friendly way I have missed here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant