HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to add a new tab on existing browser by Selenium

5,797 views April 30, 2020 3:04

Watch on YouTube
ChannelAnand Hooda Classes

Description from the creator

How to add a new tab on existing browser by Selenium


public class OpenNewTab{
public static void main(String[] args)
{
System.setProperty("webdriver.gecko.driver", "/Users/anandhooda/Anand/library/geckodriver"); // set path on Mac
//System.setProperty("webdriver.gecko.driver", "/Users/anandhooda/Anand/library/geckodriver.exe"); // set path on Window
WebDriver driver = new FirefoxDriver();
driver.get("facebook.com/";);
driver.switchTo().newWindow(WindowType.TAB); // code to open new tab
driver.get("google.com/";);

}
}

Rest API Interview Book:
Hard Copy: amazon.in/Rest-API-Interview-Questions-Answers/…

EBook: amazon.in/REST-API-Interview-Questions-Answers-…

For Online Classes:
Contact: 8744077764
What's App: 8744077764
mail: [email protected]

About this tutorial

Anand Hooda Classes published this 3:04 video tutorial on April 30, 2020. It has been watched 5,797 times on YouTube.

Category
Education
Duration
3:04
Published
April 30, 2020
Views
5,797
Likes
63

Tags

Share

This tutorial in other languages