Selector for legacy chrome windows E.G Print Dialog

To print anything from chrome is a bit of a tussle. The selector is very unstable and I read somewhere that uipath does not support such windows.

I know I ain’t the first one with the problem.

Is there any workarounds for this? Please don’t suggest sent hotkey because I cant capture the selector to send the hot key to.

Do other browsers handle this better?

Hi @josephatomwanzia ,

Can you please check if one of my old posts can help you?


I saw that and tried, it does not attach the window!

Hi @josephatomwanzia

I have a workaround for Chrome pop-ups and windows. First I attach the browser and “select” the element. Note that I can’t select the exact element. Then I open the click element in UiExplorer.

And from the Visual Tree, I find the related Window and by using highlight I’m trying to find my target element. (Expand the groups and try by clicking elements on Visual Tree.)

I hope this works for you too.

Let me try and see if it works

Sorry, but that is the tricky part. It won’t attach to the Print Window. We have to kind of arm twist the selector to manipulate the Print button of the child window.

Did you try to manually craft the selector for a Click event after you initiate ctrl+p on the main Chrome window?

<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' />

Hi again @josephatomwanzia,

I’m still looking for the original XAML that I used for my post in the other thread, if I find it I will post it here for sure.

In the meantime, I’ve attached another sequence here . It uses the Hotkey option as opposed to Web recording. I just tested it on this page and it initiates the print action to Windows OneNote successfully.

You may have to changed the Attach Browser Selector if you want to try it on another window.
Optionally you may want to preset the print option (Save as PDF, Save to OneNote etc) before you test this sequence out.


Seq_Google_Chrome_Print_Button.xaml (8.7 KB)

Found a simple solution. I Just blindly send enter as hotkey and it works every time

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