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



460
461
462
# File 'lib/crawlberg/native.rb', line 460

def key
  @key
end

Class Method Details

.from_hash(hash) ⇒ Object



487
488
489
# File 'lib/crawlberg/native.rb', line 487

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = true

#scrape?Boolean

Returns:

  • (Boolean)


483
484
485
# File 'lib/crawlberg/native.rb', line 483

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false