Non-browser application. Can't find target application

I know this error happens a lot in browsers, based on all the other questions. This is not a browser-based application. In my script I can open dbisql, I can log in/connect, but when I try to send a hotkey combo to select a menu item, I get the “Target Application could not be identified. Please open it and bring it in the correct state before indication/editing targets that belong to it.” How do I keep the application active after clicking “Connect” and getting the landing page?

My current thought is to use Ctrl-O to open the “Open” window. Then I will navigate to the query I want the script to run, and continue down that road.

The more I look at it, it seems like when I clicked “Connect” on the login screen, it is now looking for a “Connect” application. FYI, it worked perfectly and connected to the application ("Interactive SQL Version 17.0.10, build 6175), but it’s not able to reconcile being on that screen now. How do I make that the active window for consideration of the CTRL-O key send? Thanks in advance.

The error you’re encountering typically happens when UiPath cannot detect or interact with the application after the login is successful or the window changes (like after clicking “Connect” in your case). This issue can often be related to the application losing focus or not being fully ready for interaction.

Here are a few steps you can try to resolve the issue:

1. Ensure Application is Active After Login:

  • Bring the Application into Focus: After clicking “Connect,” try using the Activate or Bring Window to Front activity to ensure that the DBISQL window stays in focus and is active. This helps UiPath know which window to interact with.
  • Use the Attach Window activity to attach to the main application window, then perform the next steps inside it.

2. Increase Delay:

  • Sometimes, after the “Connect” button is clicked, the application takes a moment to load the landing page. Adding a small Delay activity after the Connect action (e.g., 1-2 seconds) can help ensure the application is fully loaded before sending hotkeys.

3. Check UI Framework Compatibility:

  • If you’re working with a non-standard or custom UI (like a non-UI automation friendly app), try using the UI Explorer to check if the window or the controls are correctly identified. You may need to switch between different UI Frameworks (e.g., Default, Active Accessibility, or UI Automation) to get the correct one.

4. Hotkey Activity Use:

  • If you’re using the Send Hotkey activity, make sure to:
    • Use the Target property to specify the correct UI element where the hotkey needs to be sent.
    • Consider using the Click activity first to focus on a specific area of the window before sending the hotkey.

5. Verify Element Visibility:

  • Sometimes, the issue occurs when the menu item or element you’re targeting isn’t in the same state as UiPath expects it to be. Check whether the element you’re trying to interact with is visible and clickable before sending the hotkey.

6. Reattach After Login:

  • After logging in, reattach the automation to the window again using Attach Window. This can help if UiPath loses context when the window state changes.

Here’s an example flow you can try:

  1. Open Application (Open DBISQL)
  2. Click Connect
  3. Delay (e.g., 1-2 seconds)
  4. Activate Window (Ensure DBISQL window is active)
  5. Attach Window (Attach to the main window of DBISQL)
  6. Send Hotkey (Use Send Hotkey activity to select the menu)

By ensuring that the window remains in focus and is properly identified, you should be able to avoid the “Target Application could not be identified” error.

Hi @rhall

Do you need this just for connecting to database & firing the query on it? if that is the case you can use the UiPath database activities to connect to any database & fire query on it by using UiPath Database activities.

For ref- [Activities - Activities Database]
(Activities - Activities)

If not then try using Use Application browser activity, Check App state activity.

Hope this helps :slight_smile:

This is an awesome list. I will work my way through them and will let you know. Thank you for putting this together. I really appreciate it.

Thank you. I will try this as well. I really appreciate you both.