Error When Running The Test in Azure DevOps | Selenium Forum
youralok Posted on 01/08/2019

I am getting following error whenever I am trying to run the tests on Azure DevOps cloud.

Though it sounds illogical, I tried to set path of my local machine, it did not work.

I already gave dependency for selenium and java in pom.xml, it did not work.

I also tried to upload the geckodriver online and used that path in pom.xmo, it did not work.


[ERROR] launchBrowser(example.DashboardAdmin) Time elapsed: 0.894 s <<< FAILURE!
java.lang.IllegalStateException: The path to the driver executable must be set by the system property; for more information, see The latest version can be downloaded from
    at example.DashboardAdmin.launchBrowser(

Support Team Replied on 02/08/2019

Have you set the web driver executable path in your code?

youralok Replied on 05/08/2019

Here is the snippet of my code that is launching the browser fine when I run the test as TestNG, run as Maven in local, and individual .class file.
But, when I run the test in Azure DevOps cloud, it gives error as mentioned earlier.


    public void launchBrowser() {
        System.out.println("launching firefox browser");
        //System.setProperty("webdriver.gecko.driver", "geckodriver.exe");
                "C:\\Users\\aagarwal\\OneDrive - Metrixlab US\\Desktop\\AutomationFramework_2019\\jars\\IEDriverServer.exe");*/

        //driver = new FirefoxDriver();
        driver = new ChromeDriver();

Support Team Replied on 07/08/2019

As i noticed your code snippet, i can see that System.setproperty part for webdriver.gecko.driver is commented out which is causing the issue

Additionally, keep the executable directly in the system itself.

youralok Replied on 28/11/2019

Please close this for now. Thanks.