質問

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.

役に立ちましたか?

解決

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

Remove size from desiredCapabilities and add windowHandleSize after init()

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top