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



328
329
330
# File 'lib/kreuzcrawl/native.rb', line 328

def amount
  @amount
end

#directionObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



328
329
330
# File 'lib/kreuzcrawl/native.rb', line 328

def direction
  @direction
end

#selectorObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



328
329
330
# File 'lib/kreuzcrawl/native.rb', line 328

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



360
361
362
# File 'lib/kreuzcrawl/native.rb', line 360

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)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


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

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = true

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false