Win10 supports selenium3.0.1?

325 Views Asked by At

Is selenium-server-standalone-3.0.1.jar compatible with Windows 10 OS ?

I am able to run a simple java program, getting below error on launching Firefox browser. Tried using TestNG, but facing same issue

Code :

package com.riversad.violet;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class DemoTests {
    public void sampleTest1(){
        System.setProperty("webdriver.gecko.driver", "D:\\Auto Violet Work Space\\VioletAutomation\\lib\\geckodriver.exe");
        WebDriver driver = new FirefoxDriver();
        driver.get("http://www.gmail.com");
    }
    public void tests() {
        System.out.println("hellow world");
    }
    public static void main(String[] args) {
        DemoTests dt=new DemoTests();
        dt.sampleTest1();
        dt.tests();
    }
}

Error :

Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE at org.apache.http.conn.ssl.SSLConnectionSocketFactory.(SSLConnectionSocketFactory.java:144) at org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:71) at org.openqa.selenium.remote.internal.HttpClientFactory.(HttpClientFactory.java:57) at org.openqa.selenium.remote.internal.HttpClientFactory.(HttpClientFactory.java:60) at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.getDefaultHttpClientFactory(ApacheHttpClient.java:250) at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.(ApacheHttpClient.java:227) at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:92) at org.openqa.selenium.remote.HttpCommandExecutor.(HttpCommandExecutor.java:71) at org.openqa.selenium.remote.HttpCommandExecutor.(HttpCommandExecutor.java:59) at org.openqa.selenium.remote.service.DriverCommandExecutor.(DriverCommandExecutor.java:49) at org.openqa.selenium.firefox.FirefoxDriver.createCommandExecutor(FirefoxDriver.java:277) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:247) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:242) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:238) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:127) at com.riversad.violet.DemoTests.sampleTest1(DemoTests.java:25) at com.riversad.violet.DemoTests.main(DemoTests.java:41)

1

There are 1 best solutions below

0
On

I have faced similar issue while using webdriver with selenium 3.0.1 on my Windows 10 machine.

Download older version selenium webdriver from [Selenium Downlaod][1]. Search for jcommander-1.48.jar from the downloaded zip file and add this jar into your current project.

This should fix the NoSuchFieldError and your project should compile successfully.