Class: Kreuzcrawl::PageActionScroll

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

Overview

Scroll the page or a specific element.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



325
326
327
# File 'lib/kreuzcrawl/native.rb', line 325

def amount
  @amount
end

#directionObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



325
326
327
# File 'lib/kreuzcrawl/native.rb', line 325

def direction
  @direction
end

#selectorObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



325
326
327
# File 'lib/kreuzcrawl/native.rb', line 325

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



357
358
359
# File 'lib/kreuzcrawl/native.rb', line 357

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


353
354
355
# File 'lib/kreuzcrawl/native.rb', line 353

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = true

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false