Chrome驱动在Linux上启动时崩溃

huangapple go评论75阅读模式
英文:

Chrome driver crashing on launch in linux

问题

package webapp;

//import java.sql.Driver;
//import java.util.*;

//import org.openqa.selenium.*;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class app {

    public static void main(String[] args) {
        // TODO Auto-generated method stub

        System.setProperty("webdriver.chrome.driver","/home/ajay/Documents/Driver/chromedriver.exe");
        WebDriver driver = new ChromeDriver();

        driver.get("https://www.facebook.com/");

        driver.get("https://www.facebook.com/");
        
        //System.out.println("Hlinux" + "ello");
    }

}

嗨,我正在使用 Selenium WebDriver 在 Linux 上的 Eclipse 中工作,Chrome 驱动程序启动后立即崩溃,请查看。

英文:
package webapp;

//import java.sql.Driver;
//import java.util.*;

//import org.openqa.selenium.*;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class app {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

System.setProperty("webdriver.chrome.driver","/home/ajay/Documents/Driver/chromedriver.exe");
WebDriver driver = new ChromeDriver();

driver.get("https://www.facebook.com/");

driver.get("https://www.facebook.com/");
		
//System.out.println("Hlinux"
		//+"ello");
	}




	}

Hi, I am working on selenium webdriver on linux in eclipse the chrome driver starts but crashes immediately please have a look.

答案1

得分: 2

chromedriver.exe 是适用于 Windows 操作系统的可执行文件。它无法在 Linux 上运行。请从此处下载适用的驱动程序。

还要确保你下载的文件具有适当的执行权限设置。

英文:

chromedriver.exe is the executable for Windows OS. It won't be running on Linux. Download appropriate driver from here.

Make also sure that the file you have downloaded has the appropriate execution permission set.

huangapple
  • 本文由 发表于 2020年10月26日 17:44:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/64534689.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定