Skip to content

Commit ab00978

Browse files
committed
Bump selenium to version 4
This will align default Selenium version with moodle-docker. Fixes #352
1 parent d3e0af6 commit ab00978

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

docs/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
99
The format of this change log follows the advice given at [Keep a CHANGELOG](https://keepachangelog.com).
1010

1111
## [Unreleased]
12+
### Changed
13+
- Bump default Selenium version to 4.
14+
1215
## [4.5.7] - 2025-03-26
1316
### Changed
1417
- Allow to run with PHP 8.4 (supported in Moodle 5.0)

src/Command/BehatCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ private function getSeleniumImage(InputInterface $input, string $profile): strin
223223
}
224224

225225
if ($profile === 'chrome') {
226-
return getenv('MOODLE_APP') ? 'selenium/standalone-chrome:120.0' : 'selenium/standalone-chrome:3';
226+
return 'selenium/standalone-chrome:4';
227227
}
228228

229229
if ($this->usesLegacyPhpWebdriver()) {
230230
return 'selenium/standalone-firefox:2.53.1';
231231
}
232232

233-
return 'selenium/standalone-firefox:3';
233+
return 'selenium/standalone-firefox:4';
234234
}
235235
}

tests/Command/BehatCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function testExecuteWithChromeProfile()
9494

9595
$commandTester = $this->executeCommand(null, null, ['--start-servers' => true, '--profile' => 'chrome']);
9696
$this->assertSame(0, $commandTester->getStatusCode());
97-
$this->assertMatchesRegularExpression('/selenium\/standalone-chrome:3/', $this->allCmds[1]);
97+
$this->assertMatchesRegularExpression('/selenium\/standalone-chrome:4/', $this->allCmds[1]);
9898
}
9999

100100
public function testExecuteWithFirefoxProfile()
@@ -104,7 +104,7 @@ public function testExecuteWithFirefoxProfile()
104104

105105
$commandTester = $this->executeCommand(null, null, ['--start-servers' => true, '--profile' => 'firefox']);
106106
$this->assertSame(0, $commandTester->getStatusCode());
107-
$this->assertMatchesRegularExpression('/selenium\/standalone-firefox:3/', $this->allCmds[1]);
107+
$this->assertMatchesRegularExpression('/selenium\/standalone-firefox:4/', $this->allCmds[1]);
108108
}
109109

110110
public function testExecuteWithLegacyFirefoxProfile()

0 commit comments

Comments
 (0)