How to effectively bring application window to the front?

Hi,
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.
Any ideas?
Thanks

This might help.

1 Like

Hi,
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…

Hi @Tommac

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).

1 Like

Hi @Tommac

Just a Suggestion. Try to add minimize and maximize window activities inside Attach window.

Thanks
Siva

@loginerror Win+UP Worked!! Thanks :slight_smile:
@sivapradeep I tried it already. It did not work unfortunatelly.

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)
1 Like

@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.

1 Like

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.

5 Likes

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.