Pregunta

Im testing my website using WatiN , and for a specific test I'm opening few IE windows and work on them simultaneously.The problem is that the windows are opened in the same position and i can't see what is going on inside the windows. Any ideas?
I'm looking for something like:

var browser=new IE();
browser.SetPosition(top_left_X,top_left_Y);
¿Fue útil?

Solución

Swapping between windows To bring one of the browsers to the front use the browser BringToFront() method.

Like:

IE ie = new IE();
ie.GoTo("www.cnn.com");
IE secondIE = new IE();
secondIE.GoTo("www.google.com");
secondIE.BringToFront();

Resizing windows To resize the windows and make them both viewable, say side by side, I believe you'll need to use something like SetWindowPos() or PInvoke's movewindow(). You can use ie.hWnd to get the window pointer to the browser. Unfortunately it has been a really long time since I've done anything like that and can't put together an example now, or even guarantee it is the right course of action.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top