Class: Crawlberg::PageActionPress

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
PageAction
Defined in:
lib/crawlberg/native.rb

Overview

Press a keyboard key (e.g. "Enter", "Tab", "Escape").

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



295
296
297
# File 'lib/crawlberg/native.rb', line 295

def key
  @key
end

Class Method Details

.from_hash(hash) ⇒ Object



321
322
323
# File 'lib/crawlberg/native.rb', line 321

def self.from_hash(hash)
  new(key: hash[:key] || hash["key"])
end

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


303
# File 'lib/crawlberg/native.rb', line 303

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


315
# File 'lib/crawlberg/native.rb', line 315

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


307
# File 'lib/crawlberg/native.rb', line 307

def press? = true

#scrape?Boolean

Returns:

  • (Boolean)


317
318
319
# File 'lib/crawlberg/native.rb', line 317

def scrape? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#screenshot?Boolean

Returns:

  • (Boolean)


313
# File 'lib/crawlberg/native.rb', line 313

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


309
# File 'lib/crawlberg/native.rb', line 309

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


305
# File 'lib/crawlberg/native.rb', line 305

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


311
# File 'lib/crawlberg/native.rb', line 311

def wait? = false