class Playwright::ConsoleMessage

`ConsoleMessage` objects are dispatched by page via the [`event: Page.console`] event.

Public Instance Methods

args() click to toggle source

List of arguments passed to a `console` function call. See also [`event: Page.console`].

# File lib/playwright_api/console_message.rb, line 6
def args
  wrap_impl(@impl.args)
end
location() click to toggle source
# File lib/playwright_api/console_message.rb, line 10
def location
  wrap_impl(@impl.location)
end
off(event, callback) click to toggle source

– inherited from EventEmitter – @nodoc

# File lib/playwright_api/console_message.rb, line 40
def off(event, callback)
  event_emitter_proxy.off(event, callback)
end
on(event, callback) click to toggle source

– inherited from EventEmitter – @nodoc

# File lib/playwright_api/console_message.rb, line 34
def on(event, callback)
  event_emitter_proxy.on(event, callback)
end
once(event, callback) click to toggle source

– inherited from EventEmitter – @nodoc

# File lib/playwright_api/console_message.rb, line 28
def once(event, callback)
  event_emitter_proxy.once(event, callback)
end
text() click to toggle source

The text of the console message.

# File lib/playwright_api/console_message.rb, line 15
def text
  wrap_impl(@impl.text)
end
type() click to toggle source

One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`, `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, `'profileEnd'`, `'count'`, `'timeEnd'`.

# File lib/playwright_api/console_message.rb, line 22
def type
  wrap_impl(@impl.type)
end

Private Instance Methods

event_emitter_proxy() click to toggle source
# File lib/playwright_api/console_message.rb, line 44
        def event_emitter_proxy
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
end