cancel
Showing results for 
Search instead for 
Did you mean: 

Activate Browser (Win32) throwing intermittent errors

john.hammond
Level 6
Good morning all.

Very new to RPA, so apologies in advance.

I'm developing an object based on a template which requires me to spy a particular browser window and then activate it. In order to activate the window, I believe that I need to spy the page in Win32 mode. There are a few objects related to this process as it covers multiple windows and plenty of steps.

The initial object launches the appropriate window and navigates to a link, clicks it, which then prompts a second object to take over. On this object, the requested page attaches to the window and then activates it - attaching seems to work fine, but activation throws the following error:
Subsheet: 'Activate' ERROR: Internal : Failed to perform step 1 in Navigate Stage 'Activate' on page 'Activate' - Unable to match any windows with the query terms

Here is the App Modeller for the window with the default attributes spied:
20782.png
It would make sense to me to detoggle 'Visible', 'Screen Visible' and 'Enabled' here, as this might not always be the case, but the modeller is then unable to highlight the appropriate window.

However, even with these all set to default, App modeller still cannot identify the window. So, I try to then go back into 'Identify' mode, but when toggling Win32 spying mode, the highlighted window no longer appears around the desired window. In fact, I have to close the object, re-open it in Blue Prism and then spy again in order for the highlighted window to appear in Win32 mode.

It feels like I'm doing something very basic wrong (particularly seeing as the logic for the rest of the object seems to be working absolutely fine, making this even more insanity-inducing). Any ideas?

I should say, this is currently running Blue Prism v6.6

------------------------------
John Hammond
------------------------------
1 BEST ANSWER

Helpful Answers

John__Carter
Staff
Staff
Welcome John - wrestling with app modeller can drive you crazy, we've all experienced this at times. Here are a couple of ideas to try

1) Is the 2nd object attaching to the same thing that the 1st object launched? Browsers can generate more than one exe (look in Task manager) and if you've attached to the 'wrong' one, you can get unexpected results.

2) Try spying a Win32 element in the 1st object (so you don't need a 2nd one)

3) Create a new object that treats the browser as a Win32 application, ie in the app modeller wizard choose the 'attach to windows application' options. Call the object something like 'Chrome Win32' and create a page called Activate.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

View answer in original post

5 REPLIES 5

John__Carter
Staff
Staff
Welcome John - wrestling with app modeller can drive you crazy, we've all experienced this at times. Here are a couple of ideas to try

1) Is the 2nd object attaching to the same thing that the 1st object launched? Browsers can generate more than one exe (look in Task manager) and if you've attached to the 'wrong' one, you can get unexpected results.

2) Try spying a Win32 element in the 1st object (so you don't need a 2nd one)

3) Create a new object that treats the browser as a Win32 application, ie in the app modeller wizard choose the 'attach to windows application' options. Call the object something like 'Chrome Win32' and create a page called Activate.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Thank you for your response John. You nailed it - it was picking up a different Chrome window to what I intended. Appreciate it muchly!

------------------------------
John Hammond
------------------------------

Hi,

I have the same problem(activate browser application using win32 mode). But I have only one browser(chrome). I know chrome has multiple tasks. when I changed ordinal value to 1 it is identifying the required and correct window only and it is working fine when testing. But when we trigger or schedule the process it is not activating the application. Even though  there is not application is open other than chrome. 

we been using blue prism 7.2.1 version and window 11 operating system. 

Could you please help me in this. 

Thanks in advance

Hi, did you get a response to your query outside of this thread, or find one elsewhere? I am having the same issue in processes using Chrome but when Chrome is running as the only application. Prior to launch, we have a check for existing Chrome windows and then a close if there are.

We have set up a Generate Arguments page which adds the command line switches to the URL (force renderer, maximise etc) and this has never caused a problem before.  

Attaching is fine, but Activate is where I am coming undone. A Utility - General Get Windows only returns one value but highlighting using Match Index confirms that there are multiple windows, and activating them using Match Index doesn't bring the hidden one to the front so I can see what it is.

I am fairly certain that I don't need the Activate for these automations to work successfully, but given that this issue is now seen on two processes using Chrome, I'd like to know what the problem is.

Could it be rooted in Chrome and not my process perhaps?

Thanks

Fran

Hi,

No, I haven’t received any response to my issue either here or outside the community. However, I was able to find a workaround for my project, and I hope it helps you as well.

Here’s what worked for me:

  1. Spy the browser—specifically an area near the minimize button (but not the minimize, maximize, or close buttons themselves).

  2. Attempt to activate the window using the Activate action. This will likely throw an error.

  3. Capture the activation error, then use the previously spied element from Step 1 and apply Focus = True.

  4. After focusing, click the spied element (from Step 1). This should bring the application to the foreground.

  5. Now, try activating the Windows application again (Step 2). In my case, it worked intermittently, but overall it solved the issue.

Note:
Highlighting Chrome using match index does not work because Chrome opens multiple background subprocesses even for a single tab. This makes it difficult for the tool to reliably target the correct window.

Ultimately, Blue Prism needs to fix this issue or provide a recommended workaround, as this can be problematic for many users.