Question

I got a problem while setting the initial window size for phantomJS using webdriverJS (https://github.com/camme/webdriverjs). What I tried was:

client.remote({
    desiredCapabilities: {
        browserName: browserList[browserName] || browserList.DEV,
        size: {
            width: 1024,
            height: 768
        }
}).init();

However this does not seem to work as screenshots are still pretty small. Maybe I'm just missing one point in the documentation but till now I couldn't find the correct key-value-combination to get a window with the correct size.

Was it helpful?

Solution

    client
      ...
      .init()
      .windowHandleSize({width: 1024, height: 768})

Remove size from desiredCapabilities and add windowHandleSize after init()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top