I have scenario when I click on Submit , it open the PDF in the window i.e. in chrome pdf viewer and I want to download that pdf in the download directory path instead opening that in the new page
${download_directory} Join Path ${OUTPUT DIR} downloads
Set Global Variable ${download_directory_guid} downloads
Create Directory ${download_directory}
Set Global Variable ${download_directory}
${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
# list of plugins to disable. disabling PDF Viewer is necessary so that PDFs are saved rather than displayed
${disabled} Create List Chrome PDF Viewer
I have been using the pdf download solution, associated with a reopening of the file in case I need to capture visual proof.
Py2PDF is used to control Pdf content.
However opening with Chrome Viewer is still an issue, as interacting with the viewer page and its shadow-Dom is quite complicated.
For example in the case on a multi page Pdf with need to scroll to a specific locator/object present in document (i.e. a logo) I was wondering if there were some solutions, or other libraries that would do the job ?
I’m using also SikuliX library, so the main concern would be to scroll down to a specific part/paragraph in the case of a logo, then use SikuliX to get the target.