How can we force selenium to focus on new tab?

Go To StackoverFlow.com

1

One of my application after clicking continue button refreshes and opens in a new tab and closes the old tab that had continue button.

Is there anyway that we can select the new tab as the current window and move forward?

I used the following code which didn't work.

selenium.select("");
selenium.select(null);

Any help would be appreciated.

2012-04-04 19:10
by seleniumlover


2

There is an additional option for selenium server. You can add -singlewindow parameter when you are starting selenium server. This parameter will force selenium to open all pages in the same frame. Please look here for more details: http://seleniumhq.org/docs/05_selenium_rc.html#server-options

Best Regards Pawel

2012-04-05 10:44
by Pawel
Ads