英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论