Reputation: 11
Is there a way to open a local pdf file using chrome driver? I have tried this
driver().switchTo().window("file://C:\Users\ashok\Downloads\fileToRead.pdf")
which is not working for me. Please help. Thanks
Upvotes: 0
Views: 561
Reputation: 33351
Local files can be opened with simple driver.get()
.
Also the slashes should be corrected.
Try this:
driver().get("C://Users/ashok/Downloads/fileToRead.pdf")
Upvotes: 1