Skip to content

Commit

Permalink
Support Dusk Selectors in screenshotElement
Browse files Browse the repository at this point in the history
  • Loading branch information
rabrowne85 authored Mar 23, 2024
1 parent 783382b commit a825b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public function screenshotElement($selector, $name)
}

$this->scrollIntoView($selector)
->driver->findElement(WebDriverBy::cssSelector($selector))
->driver->findElement(WebDriverBy::cssSelector($this->resolver->format($selector)))
->takeElementScreenshot($filePath);

return $this;
Expand Down

0 comments on commit a825b4a

Please sign in to comment.