最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: Failed to crea

programmeradmin4浏览0评论

I am trying to run the basic program to launch the chrome browser. Chrome Browser: Version 134.0.6998.178 (Official Build) (64-bit)

package testcase;

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

public class LaunchBrowser {

    public static void main(String[] args) {
        System.setProperty("webdriver.chrome.driver", "C:\\webdrivers\\chromedriver.exe");
        
        WebDriver driver = new ChromeDriver();

        driver.get(";);

        try {
            Thread.sleep(5000); // Wait 5 seconds
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        driver.quit();
    }
}

Error: Starting ChromeDriver 134.0.6998.165 (fd886e2cb29dd984c13deec032832dee68d8abe3-refs/branch-heads/6998@{#2122}) on port 44099 Only local connections are allowed. Please see for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully on port 44099. Exception in thread "main" .openqa.selenium.SessionNotCreatedException: session not created: Failed to create Chrome process. Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48' System info: host: 'AITORL-1WTLCK3', ip: '192.168.2.22', os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.12' Driver info: driver.version: ChromeDriver

I am trying to run the basic program to launch the chrome browser. Chrome Browser: Version 134.0.6998.178 (Official Build) (64-bit)

package testcase;

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

public class LaunchBrowser {

    public static void main(String[] args) {
        System.setProperty("webdriver.chrome.driver", "C:\\webdrivers\\chromedriver.exe");
        
        WebDriver driver = new ChromeDriver();

        driver.get("https://www.google");

        try {
            Thread.sleep(5000); // Wait 5 seconds
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        driver.quit();
    }
}

Error: Starting ChromeDriver 134.0.6998.165 (fd886e2cb29dd984c13deec032832dee68d8abe3-refs/branch-heads/6998@{#2122}) on port 44099 Only local connections are allowed. Please see https://chromedriver.chromium./security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully on port 44099. Exception in thread "main" .openqa.selenium.SessionNotCreatedException: session not created: Failed to create Chrome process. Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48' System info: host: 'AITORL-1WTLCK3', ip: '192.168.2.22', os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.12' Driver info: driver.version: ChromeDriver

Share Improve this question asked Mar 27 at 3:13 dheeraj kurugoddheeraj kurugod 311 silver badge4 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

It worked now, I changed the chromedriver.exe path. The updated path is as below

System.setProperty("webdriver.chrome.driver", "C:\\Users\\<user>\\Desktop\\webdrivers\\chromedriver.exe");
        WebDriver driver = new ChromeDriver();

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论