Skip to content

Commit

Permalink
Remove workaround for file input form handling
Browse files Browse the repository at this point in the history
...cause it is going to be implemented in symfony/panther
  • Loading branch information
robertfausk committed Mar 29, 2019
1 parent 2843e33 commit 0afa7e8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/PantherDriver.php
Expand Up @@ -532,13 +532,6 @@ public function setValue($xpath, $value)
$element = $this->getCrawlerElement($this->getFilteredCrawler($xpath));
$jsNode = $this->getJsNode($xpath);

// add workaround for now in case value is not a canonical path
// also see: https://github.com/minkphp/driver-testsuite/pull/32
if ('input' === $element->getTagName() && 'file' === $element->getAttribute('type')) {
$realpathValue = \realpath($value);
$value = \is_string($realpathValue) ? $realpathValue : $value;
}

if ('input' === $element->getTagName() && \in_array($element->getAttribute('type'), ['date', 'color'])) {
$this->executeScript(\sprintf('%s.value = \'%s\'', $jsNode, $value));
} else {
Expand Down

0 comments on commit 0afa7e8

Please sign in to comment.