-
-
Notifications
You must be signed in to change notification settings - Fork 228
Native Firefox support (through geckodriver) #14
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
Conversation
@@ -85,6 +85,9 @@ This listener will start the web server on demand like previously, but it will s | |||
require __DIR__.'/vendor/autoload.php'; // Composer's autoloader | |||
|
|||
$client = \Symfony\Component\Panther\Client::createChromeClient(); | |||
// Or, if you care about the open web and prefer to use Firefox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
src/DomCrawler/Link.php
Outdated
@@ -54,6 +55,6 @@ protected function setNode(\DOMElement $node) | |||
|
|||
protected function getRawUri() | |||
{ | |||
return $this->element->getAttribute('href'); | |||
return $this->element->getAttribute('href') ?? ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it return the current URI?
return $this->element->getAttribute('href') ?? ''; | |
return $this->element->getAttribute('href') ?: $this->currentUri; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I don't know.
@@ -80,6 +80,7 @@ trait PantherTestCaseTrait | |||
'router' => '', | |||
'external_base_uri' => null, | |||
'readinessPath' => '', | |||
'browser' => self::CHROME, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not firefox as base? 🦊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's a huge BC break, and because Chrome is more used (unfortunately): 64% for Chrome, 5% for Firefox.
For an unknown reason, Travis uses an outdated version of |
* Native Firefox support (through geckodriver) * Fix CS * Remove VCS repo * Cleanup * Fix lint * Use cast instead of the null coalescing operator
* Native Firefox support (through geckodriver) * Fix CS * Remove VCS repo * Cleanup * Fix lint * Use cast instead of the null coalescing operator
Allow to use Firefox as browser. The only requirement is to have Firefox installed.
Usage:
Or in a test case:
Needs php-webdriver/php-webdriver#560.