Skip to content

SAFARI: NoSuchWindowError: A request to use a window could not be satisfied because the window could not be found. #3796

@alycda

Description

@alycda

Meta -

OS: OSX 10.11.6
Selenium Version: 3.3.0, VSCode, npm/javascript
Browser: Safari

Browser Version: 10.1 (11603.1.30.0.34)

Expected Behavior -

Should be able to manipulate the window via driver.manage().window().setSize(1024,768)

Actual Behavior -

NoSuchWindowError: A request to use a window could not be satisfied because the window could not be found.

Steps to reproduce -

$ mocha --require bootstrap

bootstrap.js:

global.startWebdriver = function(browser) {
  return new Builder().forBrowser(browser).build()
    .then(function(driver) {
      global.driver = driver;
    })
}

test.js:

describe('suite', () => {
  it('test', async ()=> {
    await startWebdriver('chrome');
    await driver.get('http://google.com');
    await driver.manage().window().setSize(1024,768)
    ...
  });
});

I am using babel & es7, and this works just fine for chromedriver, so if you think I am missing something regarding that configuration, it's probably just been omitted for brevity in my example

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-nodejsJavaScript Bindings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions