Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not open connection: session not created: This version of ChromeDriver only supports Chrome version 121 #333

Open
kedarkhaire opened this issue Aug 7, 2024 · 8 comments

Comments

@kedarkhaire
Copy link

nanasess/setup-chromedriver@v2 is used for Drupal PHPUnit tests

Currently facing issue with the following error message
The original message while starting Mink: Could not open connection: session not created: This version of ChromeDriver only supports Chrome version 121
Current browser version is 127.0.6533.89 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
(Driver info: chromedriver=121.0.6167.85
The test wasn't able to connect to your webdriver instance.

Can we please look into this issue
Drupal 10.3 used
PHP 8.2 & 8.3

@nanasess
Copy link
Owner

nanasess commented Aug 7, 2024

@kedarkhaire
Can you show me the GitHub Actions log?

@kedarkhaire
Copy link
Author

kedarkhaire commented Aug 8, 2024

WebDriver\Exception\ElementNotInteractable: element not interactable
(Session info: chrome=127..6533.72)
(Driver info: chromedriver=127.
.6533.72

Link for action log

Thanks!

@nanasess
Copy link
Owner

nanasess commented Aug 8, 2024

@kedarkhaire
It does not appear to be a setup-chromedriver issue.
Please confirm that the following simple test is successful.
https://github.com/nanasess/setup-chromedriver/blob/master/__tests__/chromedriver.ts

@kedarkhaire
Copy link
Author

Hi @nanasess
The above script to check is in typescript, can you provide the same executable in php.
Thanks!

@nanasess
Copy link
Owner

nanasess commented Aug 8, 2024

@kedarkhaire
I asked GitHub Copilot to do the conversion for me. Would this be of any use to you?

<?php
require 'vendor/autoload.php';

use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\WebDriverExpectedCondition;
use Facebook\WebDriver\WebDriverKeys;

$timeout = 30000;
$host = 'http://localhost:4444/wd/hub'; // URL of the Selenium server
$driver = RemoteWebDriver::create($host, DesiredCapabilities::chrome());

try {
    $driver->get('https://google.com');
    $driver->wait($timeout / 1000)->until(
        WebDriverExpectedCondition::titleContains('Google')
    );
    echo $driver->getTitle() . "\n";

    $searchBox = $driver->findElement(WebDriverBy::name('q'));
    $searchBox->sendKeys('ChromeDriver' . WebDriverKeys::RETURN);
    $driver->wait($timeout / 1000)->until(
        WebDriverExpectedCondition::titleContains('ChromeDriver')
    );
    echo $driver->getTitle() . "\n";
} finally {
    $driver->quit();
}

@kedarkhaire
Copy link
Author

I will need to modify it, but thanks for the help, I will check.

@nanasess
Copy link
Owner

@kedarkhaire
Is the error in this assignment the same as the error below?
https://github.com/nanasess/setup-chromedriver/actions/runs/10353566059/job/28656781392

@kedarkhaire
Copy link
Author

Not the same, just SessionNotCreatedError: session not created: is same, in our case the chromedriver version is not supported & in the link mentioned above the some file is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants