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



525
526
527
# File 'lib/crawlberg/native.rb', line 525

def full_page
  @full_page
end

Class Method Details

.from_hash(hash) ⇒ Object



555
556
557
# File 'lib/crawlberg/native.rb', line 555

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


551
552
553
# File 'lib/crawlberg/native.rb', line 551

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = true

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false