I am web scraping a website that opens up the pdf I want to access in a modal view. I want to download/access this pdf.
It opens up as a pdf viewer in a modal and I can't access the download button or any other element through the Xpath. On accessing any element through Xpath, it returns an empty list .
I noticed that your screenshot about The inspect section of the modal view .
The element has an attribute
original_url
which is the original url of the pdf file.And reference to this answer, you can try to directly download the pdf file by configurating
webdriver.ChromeOptions()
.So in your case it can be like this: