class Selenium::WebDriver::DevTools::PinnedScript
Attributes
devtools_identifier[RW]
key[RW]
script[RW]
Public Class Methods
new(script)
click to toggle source
# File lib/selenium/webdriver/devtools/pinned_script.rb, line 27 def initialize(script) @key = SecureRandom.alphanumeric @script = script end
Public Instance Methods
callable()
click to toggle source
@api private
# File lib/selenium/webdriver/devtools/pinned_script.rb, line 36 def callable "function __webdriver_#{key}(arguments) { #{script} }" end
remove()
click to toggle source
@api private
# File lib/selenium/webdriver/devtools/pinned_script.rb, line 52 def remove "__webdriver_#{key} = undefined" end
to_json(*)
click to toggle source
@api private
# File lib/selenium/webdriver/devtools/pinned_script.rb, line 44 def to_json(*) %{"return __webdriver_#{key}(arguments)"} end