New Tab

How to Open New tab using selenium Web Driver java code?


  1. Google -default tab
  2. another site – New tab
Default Asked on November 20, 2018 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)

    Try this ->


    String newTab=Keys.chord(Keys.Control,’t’) -> This will  open an empty tab.

    driver.findElement(‘XPath of URL’).sendKeys(newTab) -> To open a link in the new tab

    Default Answered on December 1, 2018.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.