Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Application requires full path under Windows #179

Open
mardukbp opened this issue Oct 13, 2022 · 2 comments
Open

Open Application requires full path under Windows #179

mardukbp opened this issue Oct 13, 2022 · 2 comments

Comments

@mardukbp
Copy link

Under Windows one would expect that "Open Application" works with an executable in the PATH, like notepad.exe. But instead Windows Explorer is opened.

@rainmanwy
Copy link
Owner

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?

@mardukbp
Copy link
Author

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.

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

No branches or pull requests

2 participants