Doubt about how to print the current web page

Hi,
I am scraping a web page and using their values to fill another page (an mask). The mask is a local html file that after filled will be printed.
It is ok. After that, I have to print the page filled.
Then I’ve used the executeScript command to print,
The command that I used was “executeScript return window.print();”
But when this command is executed it print the window of the script on the IDE rather than of the page that was filled.
Thank you,

Leonardo

You need to make sure that the web browser has the focus (not the Selenium IDE) when you trigger the print command:

https://ui.vision/rpa/docs/selenium-ide/bringbrowsertoforeground

Hi!,
I’ve done as you said but its printing the Selenium IDE window yet. I’ve tested to put the BringBrowserToForeground command before and after the open command.
image

It Could be wrong window because I am working with two monitors?
Thanks,

Leonardo

I think you must use print function in the browser with Xtype (open menu and choice print in browser) or use shortcut or use an addons to print screen in browser.

Ok. I used the XTYPE command and it is OK.
Thank you,
Leonardo

1 Like