Search code examples
mavenseleniumspring-tool-suitewebdrivermanager-java

WebDrivermanager is not opening the browser


I am not able to open both IE and Chrome browsers using WebDriverManager dependency when i run as Maven test. I see that no error is thrown in console and test execution is inprogress even after several minutes. I have a println statement before the opening the browser which gets printed in the console. Can someone please help me on this?where am I going wrong ?

I am using Spring Test Suite 3.3.0(instead of Eclipse), Java 1.8, Chrome Version - 67.0.3396.99, IE version - 11.0.60

Dependency in pom.xml

<dependency>
  <groupId>io.github.bonigarcia</groupId> 
  <artifactId>webdrivermanager</artifactId> 
  <version>2.2.3</version> 
  </dependency>
 </dependencies>

Java Class code

import io.github.bonigarcia.wdm.WebDriverManager;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.testng.annotations.Test;


public class SampleTest {
    WebDriver driver;
    @Test(priority = 2)
    public void TC01()
    {

        System.out.println("Inside TC1");
        WebDriverManager.iedriver().setup();
        driver = new InternetExplorerDriver();
        driver.get("https://www.google.com/");

    }
    @Test(priority = 1)
    public void TC02()
    {

        System.out.println("Inside  TC2");

    }


}

Console


Solution

  • You can find a running example of Internet Explorer and WebDriverManager here. Moreover, take a look to the required configuration in Internet Explorer according to the Selenium doc.