-1

enter image description hereThere is a scenario that I am trying to automate through selenium webdriver (Java) and facing trouble. Print preview is not accessible through selenium as it is within shadow-root. Our task is to download the pdf files from web portals. When we clicked on print button on web, print preview window is opened and we need to click on save button in this print preview window in order to download the pdf. And also linked the URLs of the solutions that I have tried to solve this problem. for screenshot enter image description here

https://www.seleniumeasy.com/selenium-tutorials/accessing-shadow-dom-elements-with-webdriver How to interact with the elements within #shadow-root (open) while Clearing Browsing Data of Chrome Browser using cssSelector Handle Print Preview window using selenium in chrome latest version How can I tell Selenium to press cancel on a print popup? Selenium how to click Ctrl + p How to click on the print button on a web page using Selenium

1 Answers1

0

Try with mouse / keyboard actions libraries :

Library           pyautogui
Library           ImageHorizonLibrary

Check keywords :

pyautogui.Key Down  'enter'
ImageHorizonLibrary.Press Combination   Key.enter

The above libraries have additional keywords that should help.

Bahubali Patil
  • 1,127
  • 1
  • 16
  • 23