Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 6ee27df

Browse files
committed
Annouce change of variable name in changelog and tests
1 parent 4fb525b commit 6ee27df

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This project versioning adheres to [Semantic Versioning](http://semver.org/).
1010
### Changed
1111
- Revert no longer needed workaround for Chromedriver bug [2943](https://bugs.chromium.org/p/chromedriver/issues/detail?id=2943).
1212
- Allow installation of Symfony 5 components.
13+
- Rename environment variable used to pass path to ChromeDriver executable from `webdriver.chrome.driver` to `WEBDRIVER_CHROME_DRIVER`. However the old one also still works to keep backward compatibility
1314

1415
### Fixed
1516
- `WebDriverExpectedCondition::presenceOfElementLocated()` works correctly when used within `WebDriverExpectedCondition::not()`.

tests/functional/Chrome/ChromeDriverServiceTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function setUp()
3434
public function testShouldStartAndStopServiceCreatedUsingShortcutConstructor()
3535
{
3636
// The createDefaultService() method expect path to the executable to be present in the environment variable
37-
putenv(ChromeDriverService::CHROME_DRIVER_EXE_PROPERTY . '=' . getenv('CHROMEDRIVER_PATH'));
37+
putenv(ChromeDriverService::CHROME_DRIVER_EXECUTABLE . '=' . getenv('CHROMEDRIVER_PATH'));
3838

3939
$driverService = ChromeDriverService::createDefaultService();
4040

@@ -66,7 +66,7 @@ public function testShouldStartAndStopServiceCreatedUsingDefaultConstructor()
6666

6767
public function testShouldThrowExceptionIfExecutableCannotBeFound()
6868
{
69-
putenv(ChromeDriverService::CHROME_DRIVER_EXE_PROPERTY . '=/not/existing');
69+
putenv(ChromeDriverService::CHROME_DRIVER_EXECUTABLE . '=/not/existing');
7070

7171
$this->expectException(\Exception::class);
7272
$this->expectExceptionMessage('\'/not/existing\' is not a file.');
@@ -75,7 +75,7 @@ public function testShouldThrowExceptionIfExecutableCannotBeFound()
7575

7676
public function testShouldThrowExceptionIfExecutableIsNotExecutable()
7777
{
78-
putenv(ChromeDriverService::CHROME_DRIVER_EXE_PROPERTY . '=' . __FILE__);
78+
putenv(ChromeDriverService::CHROME_DRIVER_EXECUTABLE . '=' . __FILE__);
7979

8080
$this->expectException(\Exception::class);
8181
$this->expectExceptionMessage('is not executable');

tests/functional/Chrome/ChromeDriverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ protected function tearDown()
4646
public function testShouldStartChromeDriver()
4747
{
4848
// The createDefaultService() method expect path to the executable to be present in the environment variable
49-
putenv(ChromeDriverService::CHROME_DRIVER_EXE_PROPERTY . '=' . getenv('CHROMEDRIVER_PATH'));
49+
putenv(ChromeDriverService::CHROME_DRIVER_EXECUTABLE . '=' . getenv('CHROMEDRIVER_PATH'));
5050

5151
// Add --no-sandbox as a workaround for Chrome crashing: https://github.com/SeleniumHQ/selenium/issues/4961
5252
$chromeOptions = new ChromeOptions();
53-
$chromeOptions->addArguments(['--no-sandbox']);
53+
$chromeOptions->addArguments(['--no-sandbox', '--headless']);
5454
$desiredCapabilities = DesiredCapabilities::chrome();
5555
$desiredCapabilities->setCapability(ChromeOptions::CAPABILITY, $chromeOptions);
5656

0 commit comments

Comments
 (0)