Class: Crawlberg::PageActionScreenshot

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

Overview

Take a screenshot of the current page.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#full_pageObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



436
437
438
# File 'lib/crawlberg/native.rb', line 436

def full_page
  @full_page
end

Class Method Details

.from_hash(hash) ⇒ Object



467
468
469
# File 'lib/crawlberg/native.rb', line 467

def self.from_hash(hash)
  new(full_page: hash[:full_page] || hash["full_page"])
end

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


449
# File 'lib/crawlberg/native.rb', line 449

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


461
# File 'lib/crawlberg/native.rb', line 461

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


453
# File 'lib/crawlberg/native.rb', line 453

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


463
464
465
# File 'lib/crawlberg/native.rb', line 463

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

#screenshot?Boolean

Returns:

  • (Boolean)


459
# File 'lib/crawlberg/native.rb', line 459

def screenshot? = true

#scroll?Boolean

Returns:

  • (Boolean)


455
# File 'lib/crawlberg/native.rb', line 455

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


451
# File 'lib/crawlberg/native.rb', line 451

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


457
# File 'lib/crawlberg/native.rb', line 457

def wait? = false