Class: Kreuzcrawl::PageActionWait

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
PageAction
Defined in:
lib/kreuzcrawl/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



365
366
367
# File 'lib/kreuzcrawl/native.rb', line 365

def milliseconds
  @milliseconds
end

#selectorObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



365
366
367
# File 'lib/kreuzcrawl/native.rb', line 365

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



394
395
396
# File 'lib/kreuzcrawl/native.rb', line 394

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


376
# File 'lib/kreuzcrawl/native.rb', line 376

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


388
# File 'lib/kreuzcrawl/native.rb', line 388

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


380
# File 'lib/kreuzcrawl/native.rb', line 380

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


390
391
392
# File 'lib/kreuzcrawl/native.rb', line 390

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

#screenshot?Boolean

Returns:

  • (Boolean)


386
# File 'lib/kreuzcrawl/native.rb', line 386

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


382
# File 'lib/kreuzcrawl/native.rb', line 382

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


378
# File 'lib/kreuzcrawl/native.rb', line 378

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


384
# File 'lib/kreuzcrawl/native.rb', line 384

def wait? = true