How to set screen/window size when using GhostDriver
I am using the GhostDriver as the WebDriver implementation in a Java-based project. I want to take snapshots of the pages. The default page size is kind of awkward, so I want to control the page size of the snapshots. However, I can't find any examples from Google. So, can someone tell me how? Thank you very much. Have you tried setSize() method from WebDriver.Window ? Here is the documentation. // untested Java code, only provides the logic // please debug and refer to the documentation import org.openqa.selenium.Dimension; WebDriver driver = new PhantomJSDriver(); driver.manage().window()