sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #46831
[Bug 1762381] Re: [1.1.2] App.open() is not returning the instance.
Thanks. I will check.
** Summary changed:
- App.open() is not returning the instance.
+ [1.1.2] App.open() is not returning the instance.
** Changed in: sikuli
Status: New => In Progress
** Changed in: sikuli
Importance: Undecided => High
** Changed in: sikuli
Assignee: (unassigned) => RaiMan (raimund-hocke)
** Changed in: sikuli
Milestone: None => 1.1.3
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1762381
Title:
[1.1.2] App.open() is not returning the instance.
Status in Sikuli:
In Progress
Bug description:
App.open() method call does not return the instance of the opened
application instead it always return null whether application open
successfully or not.
method is "private App openAndWait(int waitTime)". Because of
"notFound" variable is false it returns null. But "appPID" is greater
than 0.
sikulixapi - 1.1.1 version
OS - 64 bit windows 10
How to reproduce.
App app = App.open("C:\\Program Files (x86)\\Microsoft
Office\\root\\Office16\\EXCEL.EXE");
this will return null but excel will be opened successfully.
Method location in App.java class
private App openAndWait(int waitTime) {
if (isImmediate) {
appPID = _osUtil.open(appNameGiven);
} else {
AppEntry appEntry = makeAppEntry();
init(_osUtil.open(appEntry));
}
if (appPID < 0) {
Debug.error("App.open failed: " + appNameGiven + " not found");
notFound = true;
} else {
Debug.action("App.open " + this.toStringShort());
}
if (isImmediate && notFound) {
return null;
}
if (waitTime > 0) {
if (!isRunning(waitTime)) {
return null;
}
}
return this;
}
Always execute this line.
if (isImmediate && notFound) {
return null;
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1762381/+subscriptions
References