Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Chrome驱动程序在linux中启动时崩溃_Java_Linux_Eclipse_Selenium_Google Chrome - Fatal编程技术网

Java Chrome驱动程序在linux中启动时崩溃

Java Chrome驱动程序在linux中启动时崩溃,java,linux,eclipse,selenium,google-chrome,Java,Linux,Eclipse,Selenium,Google Chrome,您好,我正在eclipse中的linux上使用selenium webdriver。chrome驱动程序启动但立即崩溃。请查看。chromedriver.exe是Windows操作系统的可执行文件。它不会在Linux上运行。从下载合适的驱动程序 还要确保您下载的文件设置了适当的执行权限。它是否有任何错误消息?线程“main”org.openqa.selenium.WebDriverException中出现异常异常:未知错误:Chrome无法启动:崩溃。(从chrome location/opt/

您好,我正在eclipse中的linux上使用selenium webdriver。chrome驱动程序启动但立即崩溃。请查看。

chromedriver.exe
是Windows操作系统的可执行文件。它不会在Linux上运行。从下载合适的驱动程序


还要确保您下载的文件设置了适当的执行权限。

它是否有任何错误消息?线程“main”org.openqa.selenium.WebDriverException中出现异常异常:未知错误:Chrome无法启动:崩溃。(从chrome location/opt/google/chrome/google chrome开始的进程不再运行,因此ChromeDriver假设chrome已经崩溃。)构建信息:版本:'3.141.59',修订:'e82be7d358',时间:'2018-11-14T08:25:53'系统信息:主机:'ajay System Product Name',ip:'127.0.1.1',os.Name:'Linux',os.arch:'amd64',os.version:'5.4.0-52-generic',java.version:'11.0.8'驱动程序信息:Driver.version:ChromeDriver remote stacktrace:#0 0x55d180755d99那么你能在你的应用程序之外运行位于
/opt/google/chrome/google chrome
的进程吗?是的,浏览器成功启动会遇到同样的问题吗?你能修改你的问题吗?您到底更改了什么?我已将chromedriver.exe更改为chromedriver,但仍将错误更改为chromedrivercrashed@QualityAssuranceEngineer你的问题仍然是相反的。编辑您的问题以改进它。将错误信息也包括在问题中,而不是作为注释。如果代码中的注释没有意义,请删除它们。
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");
    }




    }