0

My issue is that I am not able to close pop-up window in Firefox.

The part of automized process is that robot clicks on button "print" and the portal opens new window in Firefox. After saving of file (which is successful) I am not able to close the window with printed file to keep just the original page.

I tried to capture it by recording (Close tab) which does not work at all (error) and send there a Hotkey "ctrl+w" which closes the original page.

Comparing pages in UiExplorer I do not see any difference except url.

Lukas
  • 17
  • 1
  • 11
  • Do you still require Firefox to be open after you have closed the tab? – Conor Sep 20 '19 at 14:34
  • Yes, I need to continue downloading documents. – Lukas Sep 23 '19 at 06:22
  • Hmm, if you're still having issues with selectors could you potentially close Firefox down after each download, then navigate to the next file in a new instance of Firefox – Conor Sep 23 '19 at 14:19
  • That is something I would like to aviod due to repeatin about 70 times. – Lukas Sep 24 '19 at 07:10

1 Answers1

3

This is where selectors come into play (learn more about them here). Another browser window is likely to have a different title - use a Close Window activity with the appropriate selector. Here's an example:

close window with selector

And here's the selector for my example. Note that you can use the wildcard character (might be needed in case parts of the title will change as you print different documents).

"<html app='firefox.exe' title='Rugby World Cup 2019 - Google Search' />"

The same with a wildcard. This would now work for the 2020 World Cup as well.

"<html app='firefox.exe' title='Rugby World Cup*' />"

Keep in mind that UiPath will take the first application with a matching selector, so you want a unique one.

Wolfgang Radl
  • 2,319
  • 2
  • 17
  • 22