How to locate element Save button on chrome print preview

I trying to automate print preview area on browser using robot framework but I’m unable to locate Save button also tired with Css locators same thing element is not able to locate.

Thanks in advance.

please open chrome
1 Ctrl + P
2 Then Inspect Save button

Hi Visgwa,

I did that;

  1. chrome opened a new window so the first step is going to be telling RF to change to the new window.
  2. I also noticed save/cancel buttons are buried 3 shadowdom’s deep

Next steps for you:

  • which library are you using? (Most common ones are Browser Library and SeleniumLibrary but there are other options)
  • Once you know which library are you using, review the documentation and find out:
    • how to switch to a new window (and how to go back to the previous window)
    • how to identify elements in a shadowdom with that library? do you need to select them like frames/iframes?

Hopefully that’s helpful,


1 Like