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



351
352
353
# File 'lib/crawlberg/native.rb', line 351

def key
  @key
end

Class Method Details

.from_hash(hash) ⇒ Object



378
379
380
# File 'lib/crawlberg/native.rb', line 378

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = true

#scrape?Boolean

Returns:

  • (Boolean)


374
375
376
# File 'lib/crawlberg/native.rb', line 374

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false