Open mardukbp opened 2 years ago
hi, @mardukbp
Do you use "Open Application" and "Close Application" like below code? Open Application notepad Close Application notepad
How about the behavior in sikulix ide?
I have investigated the implementation of sikulix. My suggestion is using absolute path to start and close applications.
When use "notepad", sikulix will not set internal variable "appExec". so that "start" command in Windows will not work as expect. This could be handled in "Open Application", through "setExec". But not sure it is ok for Linux and Mac.
And for "Close Application", if input is "notepad", it will not work, as sikulix app close funtion will treat it as title, and it will not success.
I think it is better to modify "Open Application" to return pid, and "close appication" through pid. What do you think?
Thank you for the thorough analysis. I expected notepad.exe to work due to the documentation of SikuliX's App class:
The string application must allow the system to locate the application in the system specific mannor. If this is not possible you might try the full path to an application’s executable.
I was also comparing SikuliLibrary with ImageHorizonLibrary, which allows launching notepad.exe.
I think using PIDs would be sensible indeed. And I also think that launching applications that are in the PATH should work. Apparently SikuliX can do it, so the RF binding should also be able to do it.
Under Windows one would expect that "Open Application" works with an executable in the PATH, like notepad.exe. But instead Windows Explorer is opened.