Skip to content

Commit

Permalink
Add support for setting of value for html5 input type 'time'
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfausk committed Mar 28, 2020
1 parent 72a2c21 commit 8a5ccf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PantherDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ public function setValue($xpath, $value)
$element = $this->getCrawlerElement($this->getFilteredCrawler($xpath));
$jsNode = $this->getJsNode($xpath);

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

0 comments on commit 8a5ccf3

Please sign in to comment.