0

I am using NightwatchJS to test a web application. In the prelimary steps of my test, I am trying to utilize a method that should maximize the browser window, but it does not seem to work. The method is .windowMaximize() and can be found in the API documentation. In my test, when the browser launches, it is only about half the size of the screen. Below is an example of my code for the test. Can anyone see anything I am doing wrong? The test launches and runs, but the windowMaximize() method just doesn't work Sidenote: This is coffeescript, not javascript. It gets compiled by grunt before it's run.

module.exports = {
"Smart Control Tests": (browser) ->
    browser
    .windowMaximize()
    .launchAs "auto_test"
    .assert.title "My App"
    ...

    .end
}
gwydion93
  • 1,681
  • 3
  • 28
  • 59

1 Answers1

4

If using Chrome, try starting with the browser maximized by setting that option in the the chromeOptions section

"chromeOptions" : {
      "args" : ["start-maximized"]
    },
insldmc
  • 51
  • 4