Skip to content

Commit 9959f23

Browse files
committed
fix: [#465] Can't use single quotes in screenshot :selector
1 parent 0765eba commit 9959f23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ferrum/page/screenshot.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,11 @@ def viewport_area
266266
def bounding_rect(selector)
267267
rect = evaluate_async(%(
268268
const rect = document
269-
.querySelector('#{selector}')
269+
.querySelector(arguments[0])
270270
.getBoundingClientRect();
271271
const {x, y, width, height} = rect;
272-
arguments[0]([x, y, width, height])
273-
), timeout)
272+
arguments[1]([x, y, width, height])
273+
), timeout, selector)
274274

275275
{ x: rect[0], y: rect[1], width: rect[2], height: rect[3] }
276276
end

0 commit comments

Comments
 (0)