ghTvNath
ghTvNath

Reputation: 357

Selenium, how to open a link in new window?

Selenium, how to open a link in new window?What I want to do is automate what we do manually by "right click->open in new window".I am aware how to switch to new window if the link is opened in a new window.What I want to do is open in a new window automatically, using selenium.

Upvotes: 1

Views: 2187

Answers (1)

Kieren Dixon
Kieren Dixon

Reputation: 937

If you are using Selenium RC you can use the storeEval command to execute a javascript snippet which opens a new window.

selenium.browserbot.getUserWindow().open('http://www.stackoverflow.com')

This worked for me in FF 3.6 but not 6beta

Upvotes: 1

Related Questions