Skip to content
Home ยป Selenium Manager 4.6.0 – Launch Browser Without Executable Driver

Selenium Manager 4.6.0 – Launch Browser Without Executable Driver

Selenium: Now with batteries included! (Selenium WebdriverManager)

Selenium 4.6.0 has been released and now we have an exciting feature added.

We don’t need to manage any executable driver file, this feature is similar to the existing bonigarcia webdrivermanager.

Now we don’t want to use any System.setProperty(…….).

We can directly use the selenium manager command to invoke the browser.

Let’s now see how it works:

Adding Selenium 4.6.0 jar Maven dependency in POM.xml

<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.6.0</version>
</dependency>

Launch Edge browser with selenium manager:

package com.example;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.edge.EdgeDriver;
public class App 
{
    public static void main( String[] args )
    {
            WebDriver driver = new EdgeDriver();
            driver.get("https://google.com");
            System.out.println("EdgeDriver launched successfully...");
        
    }
}

Launch Chrome browser with selenium manager:

package com.example;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class App 
{
    public static void main( String[] args )
    {
            WebDriver driver = new ChromeDriver();
            driver.get("https://google.com");
            System.out.println("ChromeDriver launched successfully...");
      
    }
}

Launch FireFox browser with selenium manager:

package com.example;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class App 
{
    public static void main( String[] args )
    {
            WebDriver driver = new FirefoxDriver();
            driver.get("https://google.com");
            System.out.println("FireFoxDriver launched successfully...")
;
    }
}

Related:

Source:

Selenium Manager is a new tool that helps to get a working environment to run Selenium out of the box. Beta 1 of Selenium Manager will configure the browser drivers for Chrome, Firefox, and Edge if they are not present on the PATH.

Selenium manager 4.6.0
Follow by Email
WhatsApp