Class: Selenium::WebDriver::Script
Relationships & Source Files | |
Inherits: | Object |
Defined in: | rb/lib/selenium/webdriver/common/script.rb |
Class Method Summary
- .new(bridge) ⇒ Script constructor
Instance Method Summary
- #add_console_message_handler ⇒ int
- #add_javascript_error_handler ⇒ int
- #remove_console_message_handler(id) (also: #remove_javascript_error_handler)
-
#remove_javascript_error_handler(id)
Alias for #remove_console_message_handler.
Constructor Details
.new(bridge) ⇒ Script
# File 'rb/lib/selenium/webdriver/common/script.rb', line 23
def initialize(bridge) @log_handler = BiDi::LogHandler.new(bridge.bidi) end
Instance Method Details
#add_console_message_handler ⇒ int
# File 'rb/lib/selenium/webdriver/common/script.rb', line 28
def (&) @log_handler. ('console', &) end
#add_javascript_error_handler ⇒ int
# File 'rb/lib/selenium/webdriver/common/script.rb', line 33
def add_javascript_error_handler(&) @log_handler. ('javascript', &) end
#remove_console_message_handler(id) Also known as: #remove_javascript_error_handler
# File 'rb/lib/selenium/webdriver/common/script.rb', line 38
def (id) @log_handler. (id) end
#remove_javascript_error_handler(id)
Alias for #remove_console_message_handler.
# File 'rb/lib/selenium/webdriver/common/script.rb', line 42
alias remove_javascript_error_handler