Chrome windows detection problems

good morning everyone
I have problems in the automation in chrome detecting pop-ups, in my process I click download and a pop-up window appears, but uipath I can’t detect it with activities like find element, element exist or attach browser


Another window that does not detect uipath is when control + p is given for a print, which is also required in my process

I hope you can help me to be able to detect these windows, since the waiting time for them to appear is random and depends on the internet
thanks

One option is that you can use Hotkeys to work through these windows.

Even if the Robot does not detect the window, as long as you are latched on to the parent browser window, you will be able to target hotkeys to its child window.

1 Like

Hi @borishm

you can below options, which i tried both are working fine

  1. Using send keys to perform action
  2. Use image automation to perform actions
1 Like

@sunilch @AndyMenon

thanks for your reply

I have contemplated the keyboard shortcuts to navigate between these windows

But the problem is that when you click on the option for the pop-up window to appear, it may take a random time (and in other cases it does not appear) and I need a function such as find element or element exist that validates the load , I will try the image automation, to see if I get the expected results

from what I read in the forum, uipath does not have contemplated being able to manipulate this type of automation

RPA is thinking outside the box sometimes. Here is a trick that I performed using Basic Recording + Ui Explorer to get the Robot to at least highlight the Print Button.

Caveat is it works on a typical laptop screen but not the second larger monitor.

See if you do the same on your end. I haven’t proceeded to the next steps as I have to get back to the Reboot Festival

Step 1: Attach to the Parent Chrome Window and send a Hotkey Ctrl + p to bring up the Print Dialog

Step 2: Use the Basic Recording to Click the Print Button (Hint: Repeat click on Print button twice, the Robot will catch the Print Button)

Stop Recording and get back to the Flow in Studio and delete the First activity inside of the Basic Recording Sequence. Here is how the flow looks like:

If you open the Selector in UiExplorer you must see something like this. Observe that the full selector can go all the way down to the Print button

Right Click on push button and choose ‘Set as Target’

You will see a Selector like this below once you Save and get back to Studio

<wnd app='chrome.exe' cls='Chrome_WidgetWin_1' title='*.pdf - Google Chrome' />
<ctrl name='*.pdf' role='document' />
<ctrl name='[hidden], :host([hidden]) { display: none !important; } :host { *' role='push button' text='Print' />

Hope you will be able to unlock the rest and help the community.

thanks

2 Likes

And just to complete the rest of the discussion. I tested it and it seems to be working. The Debugger shows that the Click Event succeeded! Because I want my PDF opening up in OneNote, it successfully opened the OneNote Window. Obviously, I haven’t logged into OneNote on this machine, so that’s that.

image

Here are the Settings for the Click Activity that work for me. Yours may be different:

image

image

Cheers!

2 Likes

A quick update: I tested this on a different laptop with a Win10 Home version and by using a completely different PDF document. It worked there as well. I had to make minor adjustments to my selectors because the file has a different name.

Assuming Chrome Browsers have a stable underlying structure, maybe we can try to use this pattern for a generic selector. Only thing that most likely will need to change are the file extensions inside the selector. In this case the extension is set for pdf files. But this may also work if Chrome is a viewer for other form of non-HTML documents.

<wnd app='chrome.exe' cls='Chrome_WidgetWin_1' title='*.pdf*' />
<ctrl name='*.pdf*' role='document' />
<ctrl name='[hidden], :host([hidden]) { display: none !important; } :host { *' role='push button' text='Print' />

Hoping More folks try and test this by simply dropping this selector in their flows. :+1:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.