Rob schwankhuizen
Rob schwankhuizen

Reputation: 1

Selenium chromedriver not opening pdf in new tab

We run our niglty selenium tests headless in a agent in the cloud. But it looks like when a button click for opening a pdf. Then the pdf looks to beopend in page wihtout an url. And our tests check those urls.

Is it possible by setting a chromeoption or agurment to ensure pdf's will allways be openend in a new tab?

Running test on a local machine work. The url can't be found when running in a nighlty agent. Thats why i think it opens in a pdf viewer from chrome

Upvotes: 0

Views: 23

Answers (1)

DMart
DMart

Reputation: 2485

you can try setting always_open_pdf_externally to false in the capabilities. But this may be a limitation of headless chrome.

Upvotes: 0

Related Questions