How to open other application? For example: my win application (.exe)
You can go through with this links:
Thank you very much.
Hi, i still cannot make it open a simple application (notepad) for some reason.
Im trying to do the “Lesson 2 - Practice 1”
I tried to follow the steps in the tutorials walkthrough but it just doesn’t work.
first I located where noptepad is installed and wrote the path into the “fileName” box with quotation marks like this: “C:\Windows\notepad.exe”
But it gives me this error:
“value for a required activity argument “Selector” was not supplied” (im guessing it’s referring to the “Selector” box)
I shouldnt be typing anything in here since the walkthrough didn’t mention it.
what do to?
Hi, I don’t know the content of “Lesson 2 - Practice 1” because I haven’t passed the test, but I have some solutions.
You can use “Start Process” instead, it only requires the path of the execution file you want.
- Open notepad.exe
- Click on “Indicate on Screen” of “Open Application” activity of your workflow.
- Click on notepad, then the selector of the activity must be like below.
(I’m sorry but I’m not a native English speaker so don’t know how it’ll be like in English ver.)
Please refer to activities guide if you want to know what the selector is for.
Text property used to find a particular UI element when the activity is executed. It is actually a XML fragment specifying attributes of the GUI element you are looking for and of some of its parents.
Can someone please clarify this.
I don’t understand why UIpath need a selector to open an application. Shouldn’t the path the exe file not be enough?
As i understand Selectors, they are ment to find something that cannot be found using a native feature (like hotkeys or text fields)
With this is mind, supplying UIpath with the path to the file, it should just ask windows to run that file and attach to the resulting application container?
hmm… writing this i just realized it might be because windows does not supply a result container, and UIpath needs to use a selector to find the application window after it has been started.
Can someone confirm and/or explaine this?
We won’t know for sure (unless UiPath decides to share their exact code), but getting the window handle back can sometimes be risky - think of an app that has a splash screen, as an example. Those can last for a while (and are treated as windows from OS perspective), but from usability perspective they’re useless. Having a selector would enable to verify that it is what it should be.
BTW - if you just want to launch something without attaching to it’s window, you can use StartProcess instead.
Now as I was writing it, I wouldn’t be surprised if OpenApplication is a combination of StartProcess and AttachWindow under the hood (would make sense) and that’s why it needs a selector (it’s needed for Attach).
Not the best but one workaround will be to create a shortcut and use “Click image” (double click) to click on the image of shortcut
Thanks for the responce!
I want to start an app and then do something in the app when it has started.
The problem is that using the “openApplication” the app starts, but then can’t find the window afterwards and throws an exception.
I’ve made a workaround with a try-catch to an extra attachWindow to get it to work.
I’m thinking it’s just this one application that makes it crash, so i’ll just leave it with the workaround for now
Thank you for your sugestion. I can’t use it in my current case, but maybe another time. Thanks!
In my case, the first step was “start process” (in the property “file name” indicate the full path to your app) , and then “attach windows” .
I hope this can help you.
This was driving me nuts for a little while too, but I realized that I was looking at it wrong and there was an easy fix - the selector is trying to attach to the UI elements of the application you are opening, so just open an instance of the application and then go back to Studio and click “Indicate on Screen.” Then you just need to click inside the open instance of the application and that populates the Selector.
@jcarr79 thank you for making it clear…I now see that the others were trying to say the same thing but you just made it clearer. Thanks for that!! How did you figure it out? This seems to be the equivalent of spying in Blue Prism, at least it seems to me, would that be correct? So far in my reading, UIPath hasn’t made this clear.
Thanks in advance!
I’m not familiar with Blue Prism, so I can’t say for sure. In my Googling to try and figure out what I was doing wrong, I saw someone trying to explain that without the selector UIPath wouldn’t know how to interact with the process after it opened. That’s when it clicked that the selector was about the open application after it is already opened, not about where to find it to open in the first place.
Thank you - this worked!
HI @Junaid_H ,
You need to supply selector for this activity and then populate Arguments property with full path of your file.
You can open your application (for e.g. Notepad) by using Open Application activity. Follow the steps:
- Drag Open Application activity.
- Use Indicate window on screen and indicate on Notepad window.
- Following properties gets populated automatically.
a. FileName - “C:\Window\system32\notepad.exe”
b. Selector - "<wnd app=‘notepad.exe’ cls=‘Notepad’ title=’* - Notepad’ " (Use wildcard * for matching any file’s name)
- Now fill the Arguments property with the full path of your file. For e.g. “D:\MyFolder\MyNotepad.txt”
- Run the automation.
how did you get these
From were its coming Can you able to explain to me