-1

Trying to run some Selenium here on a webApp that is size sensitive, and I cannot figure out how to resize the window in chrome. The following does not work:

executeScript("window.resizeTo(200,200)"

this seems not to be supported by chrome from what I've found. Execution just skips over this line with no errors but also no effect.

the DSL provided by scalatest plus and the WebBrowser does not seem to provide any way to access manage.window or driver.window functionality available in other languages.

Thoughts?

Thanks,

Driver
  • 317
  • 1
  • 4
  • 18

1 Answers1

0

The trick here is to explicitly access the implicit webdriver. For some reason I am able to call

webDriver.manage.window.setSize(new org.openqa.selenium.Dimension(1000, 600))

but not

manage.window.setSize(new org.openqa.selenium.Dimension(1000, 600))

You might also notice I am working on some goofiness with the import statement...simply importing

org.openqa.selenium.Dimension

did not work, I had to throw the whole statement in line with the object creation.

Driver
  • 317
  • 1
  • 4
  • 18