I have a script that performs activities on an active desktop app (including Find Image) - it works well if the application window is in the front.
I tried to bring it to the front using Attach Window, Activate, Show activities. They technically succed (no failure) but the window is still not in the front and the following steps fail.
This might help.
Thanks for reply. This is a desktop app, not a browser. Assuption is that the app is already active so I should not open it - right?
I tried using Invoke Method BringtoForeground after calling Attach. Attach was successful and I checked that variable has some value. Invoke was successful. Same results…
Just an idea. How about sending a Win+UP command with SendWindowsMessages? Hopefully it would maximize the window and bring it to the foreground in the process (it’s a wild guess though).
Just a Suggestion. Try to add minimize and maximize window activities inside Attach window.
For sake of clarity - I am writing a robot to work on Bluestacks (android simulator) which should work on application which is launched within Bluestacks.
Theoretically I should be using Cytrix features but they work strangely e.g.:
- Find Image works; Find Images and Click Image does not work
- If I try to close the app a popup appears to confirm which is not clickable for UIPath (it says that app was not found - app mentioned in selector)
@Tommac Off topic but I am also interested in automation an application within Bluestacks. Did you ever find a way to be able to get UiPath to differentiate selectors within Bluestacks?
Can you elaborate on this by giving steps or pointing to an example?
You can use the Send Hotkey activity. It allows you to send the key combination to the specific window on your Desktop.
UiPath.Core.Activities.Activate provides the functionality to bring a window to the foreground. If you are already within an Open Application or Application Scope, it is as simple as dragging the activity in.
Do we need to attach to the application before activate; if the applications is already open? My app is already open and there is an attach step, but it is not getting the window forward.
Best way is to use a “Find Element” to get at UI Window handle and store it, then use this instead of a selector to “Activate” the window.