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



324
325
326
# File 'lib/crawlberg/native.rb', line 324

def key
  @key
end

Class Method Details

.from_hash(hash) ⇒ Object



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

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = true

#scrape?Boolean

Returns:

  • (Boolean)


347
348
349
# File 'lib/crawlberg/native.rb', line 347

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false