How to force Selenium to open a link in a new window?
问题 I need to open a link on a webpage in a new Chrome Window. There was already a question but this appears to be for RC. I tried driver.getUserWindow().open("http....."); But it is not working. May be there is a way to force Chrome to do that for all links? Ideally, i would like to know how to force a driver to open a link in a new window. (i am using java and OS Windows 7 回答1: You can use Actions class to perform this. Actions act = new Actions(driver); WebElement onElement = Your element on