Mozilla firefox geckodriver fix.#575
Mozilla firefox geckodriver fix.#575zyrukas wants to merge 2 commits intophp-webdriver:communityfrom
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
@OndraM Please review :) |
|
|
||
| return $this->newElement($raw_element['ELEMENT']); | ||
| return $this->newElement( | ||
| isset($raw_element['ELEMENT']) ? $raw_element['ELEMENT'] : $raw_element[\key($raw_element)] |
There was a problem hiding this comment.
Hi, you can create a separate function. In order not to violate DRY
private function _getElement($raw_element) {
return isset($raw_element['ELEMENT']) ?
$raw_element['ELEMENT'] : $raw_element[\key($raw_element)];
}| $elements = []; | ||
| foreach ($raw_elements as $raw_element) { | ||
| $elements[] = $this->newElement($raw_element['ELEMENT']); | ||
| $elements[] = $this->newElement( |
There was a problem hiding this comment.
$elements[] = $this->newElement($this->_getElement($raw_element));|
Hi Hi, For what it's worth, I got this error using Codeception & BrowserStack using FF v62.0 |
I was unable to make clicks in selenium + geckodriver, until I made this change.
Mozilla firefox geckodriver fix. ([PHPUnit\Framework\Exception] Undefined index: ELEMENT).