문제

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