Search code examples
selenium-webdriverselenium-firefoxdrivercucumber-java

opening a local pdf file through firefox webdriver


I want to open a pdf document through firefox webdriver.I used the command

driver.get("file:///root/file.pdf");

but the document does not open.How should I do that?


Solution

  • I fixed this issue,by setting

    firefoxProfile.setPreference( "pdfjs.disabled", false );