I wanted to use Win32API to do some window manipulation.  I ended up 
finding another way to do it.  Basically I have a number of browsers I'm 
opening and I want to be able to position them in different places on the 
screen.  Not really a functional test or requirement, but it'll make it 
easier for me to monitor the tests when running and nice for demos.

I decided to change the title of the browser and then I can uniquely 
identify them if I need to be able to before calling the Win32API functions 
I need to.

Something like this:

browser.execute_script("document.title = 'UniqueBrowser #{x}'")
hWnd = FindWindow.call(nil, "UniqueBrowser #{x} - Google Chrome")
ret = MoveWindow.call(hWnd, 0, 0, 640, 512, true)

Knowing full well that after I goto any other page that this title I've set 
will be gone.  I just really need it for the initial set-up.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to