Automate testing script that calls for 2 browser windows to use 2 monitors

Hi,
I am trying to write an automation script that calls for 2 browser windows to be opened on 2 different monitors. So the first window is one the first monitor and the 2 browser is moved from the first monitor to the second monitor.

Here are a couple of methods I use:

  static void moveBrowser(int x, int y) {
    WebDriver driver = DriverFactory.getWebDriver()
    Capabilities cap = ((SmartWaitWebDriver) driver).getCapabilities()
    driver.manage().window().setPosition(new Point(x, y))
  }

  static void sizeBrowser(int w, int h) {
    WebDriver driver = DriverFactory.getWebDriver()
    Dimension d = new Dimension(w, h)
    driver.manage().window().setSize(d)
  }