(Watir webdriver) How to move the browser to another screen when using multiple displays in OSX 10.9

I know that there is a function browser.window.move_to (0, 0) to move the browser to another place, but OSX 10.9 is completely new for it.

Can I use any methods to move the browser to another desktop? For example. The console launches the command in "Desktop 2", but I want the browser to appear in "Desktop 1".

Many thanks!

+7
ruby selenium selenium-webdriver watir-webdriver watir
source share
1 answer

Ha, I was going to say that this is possibly not possible, before I tried this:

browser.window.move_to(-1200,0) 

My second monitor is oriented to the left of my main screen. It worked. Good question.

You will need to fool it in order to get everything right, but it looks like it can use the entire canvas of monitors. If your monitor was taller than your main screen, for example, you move it there using something like

 browser.window.move_to(0,-1000) 
+6
source share

All Articles