From a825b4a912c454c50e0e9e0dbb5c473d1c5d306a Mon Sep 17 00:00:00 2001 From: Richard Browne Date: Sat, 23 Mar 2024 16:41:13 +0000 Subject: [PATCH] Support Dusk Selectors in `screenshotElement` --- src/Browser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Browser.php b/src/Browser.php index 5a4b2d09a..7471226a2 100644 --- a/src/Browser.php +++ b/src/Browser.php @@ -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;