Access to PhantomJS "page" object through Selenium WebDriver JavaScriptExecutor

34 Views Asked by At

I have a testing setup where I drive PhantomJS through Selenium. Now I'd like to save screen captures as PDF files instead of getting them as plain PNG.

PhantomJS could do this out of the box by calling render on the current webpage instance.

However, how can I get that instance in code that is executed in PhantomJS with a JavaScriptExecutor? Is that even possible?

0

There are 0 best solutions below