Class: Crawlberg::PageActionWait

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

Overview

Wait for a duration or for an element to appear.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#millisecondsObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



427
428
429
# File 'lib/crawlberg/native.rb', line 427

def milliseconds
  @milliseconds
end

#selectorObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



427
428
429
# File 'lib/crawlberg/native.rb', line 427

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



458
459
460
# File 'lib/crawlberg/native.rb', line 458

def self.from_hash(hash)
  new(milliseconds: hash[:milliseconds] || hash["milliseconds"], selector: hash[:selector] || hash["selector"])
end

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


454
455
456
# File 'lib/crawlberg/native.rb', line 454

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = true