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



362
363
364
# File 'lib/kreuzcrawl/native.rb', line 362

def milliseconds
  @milliseconds
end

#selectorObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



362
363
364
# File 'lib/kreuzcrawl/native.rb', line 362

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



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

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


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

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = true