Can we add drivers in selenium as maven depandancies

后端 未结 2 649
既然无缘
既然无缘 2020-12-19 14:55

Can we add gecko driver , ie driver or chrome driver as depandancy in POM? I tried to search but was not able to fine them on https://mvnrepository.com/artifact. Any reason

2条回答
  •  盖世英雄少女心
    2020-12-19 15:17

    Check out this link for more clarification//use below the line it'll solve for chrome

        WebDriverManager.chromedriver().browserVersion("77.0.3865.40").setup();
    WebDriver driver = new ChromeDriver();
            
            driver.get("URL");
    

    //also you need to add below dependency into POM file`

    
        io.github.bonigarcia
        webdrivermanager
        2.2.1
    `
    

提交回复
热议问题