How to open a new tab using Selenium WebDriver?

后端 未结 29 2924
野的像风
野的像风 2020-11-22 04:40

How to open a new tab in the existing Firefox browser using Selenium WebDriver (a.k.a. Selenium 2)?

29条回答
  •  借酒劲吻你
    2020-11-22 05:34

    Below code will open the link in new window

    String selectAll = Keys.chord(Keys.SHIFT,Keys.RETURN);
    driver.findElement(By.linkText("linkname")).sendKeys(selectAll);
    

提交回复
热议问题