ceiling cat
ceiling cat

Reputation: 5701

How do I make Selenium RC to not move the browser window?

Is there a way to specify where Selenium RC spawns the browser window?

When I run my test script, Selenium RC opens 2 windows in the browser, the Selenium RC window and the AUT, and the Selenium RC window takes up most of my screen space. Ideally, I want to control where their location and size separately, but if not, it would be nice to at least make the AUT maximized so that I can eyeball some stuff. Is there a way to do this?

I have tried window_maximize(). Although it does make the AUT window bigger, it is located in the bottom of the screen - only the top 1/4 is visible. I am using Selenium RC with Python on a Mac if that matters.

Upvotes: 1

Views: 747

Answers (1)

Chris Noe
Chris Noe

Reputation: 37161

This works from java:

selenium.getEval("this.browserbot.getCurrentWindow().moveTo((" + h + "),(" + v + "))");
selenium.getEval("this.browserbot.getCurrentWindow().resizeTo(" + w + "," + h + ")");

Upvotes: 1

Related Questions