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



536
537
538
# File 'lib/crawlberg/native.rb', line 536

def milliseconds
  @milliseconds
end

#selectorObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



536
537
538
# File 'lib/crawlberg/native.rb', line 536

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



567
568
569
# File 'lib/crawlberg/native.rb', line 567

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


563
564
565
# File 'lib/crawlberg/native.rb', line 563

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = true