简体   繁体   English

org.openqa.selenium.SessionNotCreatedException:会话未为Chrome创建异常

[英]org.openqa.selenium.SessionNotCreatedException: session not created exception for Chrome

public void openBrowser()
    {
        if(!isBrowserOpened)
        {
            if(config_getproperty("browserType").equals("MOZILLA"))
                driver = new FirefoxDriver();
            else if (config_getproperty("browserType").equals("IE"))
                driver = new InternetExplorerDriver();
            else if (config_getproperty("browserType").equals("CHROME"))
            {
                System.setProperty("webdriver.chrome.driver",System.getProperty("user.dir")+"\\chromedriver.exe" );
                driver = new ChromeDriver();
            }

            isBrowserOpened=true;
            String waitTime=config_getproperty("default_implicitWait");
            driver.manage().timeouts().implicitlyWait(Long.parseLong(waitTime), TimeUnit.SECONDS);
            driver.manage().window().maximize();
        }

this code was working till yesterday but suddenly after restart it stopped working showing session not established. 该代码一直运行到昨天,但是突然重启后,它停止工作,表明会话未建立。 I tried all other solutions..Replaced Chrome exe with latest version replaced webdriver with 3.0 but still it was not working. 我尝试了所有其他解决方案。用最新版本替换了Chrome exe,将webdriver替换为3.0,但仍然无法正常工作。 Can anyone please help me. 谁能帮帮我吗。

This issue started showing up after chrome Version 54.0.x updates. chrome版本54.0.x更新后,开始出现此问题。 Remove the older chromedriver from your path and update your chromedriver to 2.24. 从路径中删除较旧的chromedriver,然后将chromedriver更新为2.24。 This should resolve your issue. 这样可以解决您的问题。

需要更多信息,例如来自控制台的错误日志,这将进行详细说明,这似乎是版本兼容性问题,将v降级并查看情况是否良好

npm rm chromedriver
npm install chromedriver@2.25.1

What @Keshav said. @Keshav说了什么。 Basically, you need an updated version of the Chrome driver. 基本上,您需要Chrome驱动程序的更新版本。

Update ChromeDriver https://chromedriver.storage.googleapis.com/index.html?path=2.25/ . 更新ChromeDriver https://chromedriver.storage.googleapis.com/index.html?path=2.25/ This should solve the issue 这应该解决问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 org.openqa.selenium.SessionNotCreatedException: session not created: 此版本的 ChromeDriver 仅支持使用 Selenium 的 Chrome 75 版 - org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 75 using Selenium org.openqa.selenium.SessionNotCreatedException:会话未创建断开连接:无法使用 ChromeDriver 和 Chrome 将消息发送到渲染器错误 - org.openqa.selenium.SessionNotCreatedException: session not created disconnected:unable to send message to renderer error with ChromeDriver and Chrome org.openqa.selenium.SessionNotCreatedException - org.openqa.selenium.SessionNotCreatedException org.openqa.selenium.SessionNotCreatedException - org.openqa.selenium.SessionNotCreatedException org.openqa.selenium.SessionNotCreatedException: session not created exception from tab crashed error when executing from Jenkins CI 服务器 - org.openqa.selenium.SessionNotCreatedException: session not created exception from tab crashed error when executing from Jenkins CI server Selenium(OSX 和 Linux)抛出错误 org.openqa.selenium.SessionNotCreatedException:会话未创建:找不到匹配的功能 - Selenium(OSX and Linux) thowing error org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found Appium 错误:线程“main”org.openqa.selenium.SessionNotCreatedException 中的异常:无法创建新的远程会话 - Appium Error :Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session SeleniumError:org.openqa.selenium.SessionNotCreatedException - SeleniumError : org.openqa.selenium.SessionNotCreatedException org.openqa.selenium.SessionNotCreatedException 与 Appium - org.openqa.selenium.SessionNotCreatedException with Appium Appium _org.openqa.selenium.SessionNotCreatedException - Appium _org.openqa.selenium.SessionNotCreatedException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM