Bringing Selenium Test Window to the front automatically?

374 views
Skip to first unread message

chris

unread,
Aug 11, 2008, 9:48:12 PM8/11/08
to selenium-users...@googlegroups.com
I have everything working now- automated, but one thing. When I open a new browser session through Selenium, it always opens in the background!Is there any way to bring it automatically into focus/up front? I am using the java robot to put in the information Selenium can't handle, but is there a java or selenium command that will bring the window up front? The selenium functions for "focus" and "maximize" seem to still work in the background! It can do its own things, but the java robot cannot.

Any ideas besides having the same number of windows open every time and having the robot select the new window?

Thank you-

sugumar

unread,
Aug 13, 2008, 1:42:25 AM8/13/08
to selenium-users...@googlegroups.com
hi,

For selecting and bringing focus to that window you can use this..


$this->selenium->selectWindow("Window Title");
$this->selenium->windowFocus();

and to bring focus to the parent window use this..

$this->selenium->selectWindow("");\\ $this->selenium->windowFocus();

Rajlaxmi Katkati

unread,
May 28, 2014, 8:59:58 AM5/28/14
to seleniu...@googlegroups.com, selenium-users...@googlegroups.com, clear...@openqa.org, sugu...@gmail.com
Hi ,

I am pretty much unclear about the approach that is mentioned above. Would be a great help if put up a sample selenium code + core java to bring the newly open window on front to the screen.

David

unread,
May 28, 2014, 2:38:02 PM5/28/14
to seleniu...@googlegroups.com, selenium-users...@googlegroups.com, clear...@openqa.org, sugu...@gmail.com
Is the request for Selenium RC or WebDriver?
Reply all
Reply to author
Forward
0 new messages