Class: Crawlberg::PageActionScroll
- Inherits:
-
Data
- Object
- Data
- Crawlberg::PageActionScroll
- Extended by:
- T::Sig
- Includes:
- PageAction
- Defined in:
- lib/crawlberg/native.rb
Overview
Scroll the page or a specific element.
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
-
#direction ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
-
#selector ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
- #click? ⇒ Boolean
- #execute_js? ⇒ Boolean
- #press? ⇒ Boolean
- #scrape? ⇒ Boolean
- #screenshot? ⇒ Boolean
- #scroll? ⇒ Boolean
- #type_text? ⇒ Boolean
- #wait? ⇒ Boolean
Instance Attribute Details
#amount ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
454 455 456 |
# File 'lib/crawlberg/native.rb', line 454 def amount @amount end |
#direction ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
454 455 456 |
# File 'lib/crawlberg/native.rb', line 454 def direction @direction end |
#selector ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
454 455 456 |
# File 'lib/crawlberg/native.rb', line 454 def selector @selector end |
Class Method Details
.from_hash(hash) ⇒ Object
486 487 488 |
# File 'lib/crawlberg/native.rb', line 486 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
468 |
# File 'lib/crawlberg/native.rb', line 468 def click? = false |
#execute_js? ⇒ Boolean
480 |
# File 'lib/crawlberg/native.rb', line 480 def execute_js? = false |
#press? ⇒ Boolean
472 |
# File 'lib/crawlberg/native.rb', line 472 def press? = false |
#scrape? ⇒ Boolean
482 483 484 |
# File 'lib/crawlberg/native.rb', line 482 def scrape? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#screenshot? ⇒ Boolean
478 |
# File 'lib/crawlberg/native.rb', line 478 def screenshot? = false |
#scroll? ⇒ Boolean
474 |
# File 'lib/crawlberg/native.rb', line 474 def scroll? = true |
#type_text? ⇒ Boolean
470 |
# File 'lib/crawlberg/native.rb', line 470 def type_text? = false |
#wait? ⇒ Boolean
476 |
# File 'lib/crawlberg/native.rb', line 476 def wait? = false |