class Selenium::WebDriver::Script
Public Class Methods
Source
# File lib/selenium/webdriver/common/script.rb, line 23 def initialize(bridge) @log_handler = BiDi::LogHandler.new(bridge.bidi) end
Public Instance Methods
Source
# File lib/selenium/webdriver/common/script.rb, line 28 def add_console_message_handler(&) @log_handler.add_message_handler('console', &) end
@return [int] id of the handler
Source
# File lib/selenium/webdriver/common/script.rb, line 33 def add_javascript_error_handler(&) @log_handler.add_message_handler('javascript', &) end
@return [int] id of the handler
Source
# File lib/selenium/webdriver/common/script.rb, line 38 def remove_console_message_handler(id) @log_handler.remove_message_handler(id) end
@param [int] id of the handler previously added
Also aliased as: remove_javascript_error_handler