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
383 384 385 |
# File 'lib/crawlberg/native.rb', line 383 def amount @amount end |
#direction ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
383 384 385 |
# File 'lib/crawlberg/native.rb', line 383 def direction @direction end |
#selector ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
383 384 385 |
# File 'lib/crawlberg/native.rb', line 383 def selector @selector end |
Class Method Details
.from_hash(hash) ⇒ Object
418 419 420 421 422 423 424 |
# File 'lib/crawlberg/native.rb', line 418 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
400 |
# File 'lib/crawlberg/native.rb', line 400 def click? = false |
#execute_js? ⇒ Boolean
412 |
# File 'lib/crawlberg/native.rb', line 412 def execute_js? = false |
#press? ⇒ Boolean
404 |
# File 'lib/crawlberg/native.rb', line 404 def press? = false |
#scrape? ⇒ Boolean
414 415 416 |
# File 'lib/crawlberg/native.rb', line 414 def scrape? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#screenshot? ⇒ Boolean
410 |
# File 'lib/crawlberg/native.rb', line 410 def screenshot? = false |
#scroll? ⇒ Boolean
406 |
# File 'lib/crawlberg/native.rb', line 406 def scroll? = true |
#type_text? ⇒ Boolean
402 |
# File 'lib/crawlberg/native.rb', line 402 def type_text? = false |
#wait? ⇒ Boolean
408 |
# File 'lib/crawlberg/native.rb', line 408 def wait? = false |