Class: Puppeteer::Bidi::ConsoleMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/bidi/console_message.rb,
sig/puppeteer/bidi/console_message.rbs

Overview

ConsoleMessage represents a browser console/log entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, text:, args: [], location: nil, stack_trace: []) ⇒ ConsoleMessage

Returns a new instance of ConsoleMessage.

Parameters:

  • type: (String)
  • text: (String)
  • args: (Array[JSHandle]) (defaults to: [])
  • location: (Hash[Symbol, untyped], nil) (defaults to: nil)
  • stack_trace: (Array[Hash[Symbol, untyped]]) (defaults to: [])


16
17
18
19
20
21
22
# File 'lib/puppeteer/bidi/console_message.rb', line 16

def initialize(type:, text:, args: [], location: nil, stack_trace: [])
  @type = type
  @text = text
  @args = args
  @location = location
  @stack_trace = stack_trace
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.

Returns:

  • (Object)


8
9
10
# File 'lib/puppeteer/bidi/console_message.rb', line 8

def args
  @args
end

#locationObject (readonly)

Returns the value of attribute location.

Returns:

  • (Object)


8
9
10
# File 'lib/puppeteer/bidi/console_message.rb', line 8

def location
  @location
end

#stack_traceObject (readonly)

Returns the value of attribute stack_trace.

Returns:

  • (Object)


8
9
10
# File 'lib/puppeteer/bidi/console_message.rb', line 8

def stack_trace
  @stack_trace
end

#textObject (readonly)

Returns the value of attribute text.

Returns:

  • (Object)


8
9
10
# File 'lib/puppeteer/bidi/console_message.rb', line 8

def text
  @text
end

#typeObject (readonly)

Returns the value of attribute type.

Returns:

  • (Object)


8
9
10
# File 'lib/puppeteer/bidi/console_message.rb', line 8

def type
  @type
end