3

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.

oberlies
  • 11,503
  • 4
  • 63
  • 110
philgiese
  • 623
  • 1
  • 7
  • 17

1 Answers1

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

Remove size from desiredCapabilities and add windowHandleSize after init()

Ivan Ivanic
  • 2,982
  • 1
  • 20
  • 21