Skip to content

Commit

Permalink
Remove PhantomJS support
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Nov 29, 2020
1 parent 48358d6 commit f49b6bf
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -37,6 +37,7 @@
- `UniqueValue` component. (You may use Faker or some other library for similar use-case.)
- `AbstractTestCaseBase` class. It should probably not affect anything, as it was only used internally.
- Workarounds for legacy Firefox (version 47 and older) which are no longer needed.
- PhantomJS support.

## 2.3.2 - 2017-12-02
### Changed
Expand Down
1 change: 0 additions & 1 deletion src-tests/Console/Command/RunCommandTest.php
Expand Up @@ -174,7 +174,6 @@ public function provideBrowserName(): array
return [
'firefox is supported' => ['firefox', false, 'firefox'],
'chrome is supported' => ['chrome', false, 'chrome'],
'phantomjs is supported' => ['phantomjs', false, 'phantomjs'],
'MicrosoftEdge is supported' => ['MicrosoftEdge', false, 'MicrosoftEdge'],
'MicrosoftEdge is supported in lowercase' => ['microsoftedge', false, 'MicrosoftEdge'],
'browser name is case insensitive' => ['FIREFOX', false, 'firefox'],
Expand Down
1 change: 0 additions & 1 deletion src-tests/Selenium/CapabilitiesResolverTest.php
Expand Up @@ -60,7 +60,6 @@ function ($capabilitiesArray): void {
},
],
[WebDriverBrowserType::SAFARI],
[WebDriverBrowserType::PHANTOMJS],
];
}

Expand Down
5 changes: 3 additions & 2 deletions src/Console/Command/RunCommand.php
Expand Up @@ -36,7 +36,6 @@ class RunCommand extends Command
'microsoftedge' => WebDriverBrowserType::MICROSOFT_EDGE,
'internet explorer' => WebDriverBrowserType::IE,
'safari' => WebDriverBrowserType::SAFARI,
'phantomjs' => WebDriverBrowserType::PHANTOMJS,
];

public const ARGUMENT_ENVIRONMENT = 'environment';
Expand Down Expand Up @@ -159,7 +158,9 @@ protected function configure(): void
);

$this->addUsage('staging firefox');
$this->addUsage('--group=foo --group=bar --exclude-group=baz -vvv development phantomjs');
$this->addUsage(
'--group=foo --group=bar --exclude-group=baz --server-url=http://localhost:4444/wd/hub -vv staging chrome'
);

$this->getDispatcher()->dispatch(CommandEvents::CONFIGURE, new BasicConsoleEvent($this));
}
Expand Down
6 changes: 0 additions & 6 deletions src/Listener/WebDriverListener.php
Expand Up @@ -122,12 +122,6 @@ public function endTest(Test $test, float $time): void
ob_start(); // Capture any output from commands bellow to make them appended to output of the test.

try {
// Workaround for PhantomJS 1.x - see https://github.com/detro/ghostdriver/issues/343
// Should be removed with PhantomJS 2
if (ConfigProvider::getInstance()->browserName === WebDriverBrowserType::PHANTOMJS) {
$test->wd->execute('deleteAllCookies');
}

$test->wd->close();
$test->wd->quit();
} catch (WebDriverException $e) {
Expand Down

0 comments on commit f49b6bf

Please sign in to comment.