Selenium 3.7 : geckodriver : WebDriverException: org.apache.http.conn.HttpHostConnectException Connection Refused

前端 未结 4 1291
感情败类
感情败类 2020-12-04 03:46

Recently I upgraded to Selenium 3.7.

Code:

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


public static         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 04:10

    I tried with the same versions without any problem.

    If the path to the geckodriver:

    System.setProperty("webdriver.gecko.driver", 
        "/usr/local/bin/geckodriver"); 
    

    is correct, make sure that the geckodriver is executable for the user that execute the code:

    chmod +x geckodriver
    

提交回复
热议问题