Skip to content

Commit a81e24f

Browse files
committed
fix: Runtime.consoleAPICalled logger should be called on options
1 parent 280a6dc commit a81e24f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ferrum/page.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@ def command(method, wait: 0, slowmoable: false, **params)
276276
result = @client.command(method, params)
277277

278278
if wait.positive?
279-
@event.wait(wait)
280279
# Wait a bit after command and check if iteration has
281280
# changed which means there was some network event for
282281
# the main frame and it started to load new content.
282+
@event.wait(wait)
283283
if iteration != @event.iteration
284284
set = @event.wait(timeout)
285285
raise TimeoutError unless set
@@ -333,7 +333,7 @@ def subscribe
333333

334334
if @browser.options.logger
335335
on("Runtime.consoleAPICalled") do |params|
336-
params["args"].each { |r| @browser.logger.puts(r["value"]) }
336+
params["args"].each { |r| @browser.options.logger.puts(r["value"]) }
337337
end
338338
end
339339

0 commit comments

Comments
 (0)