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



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

def full_page
  @full_page
end

Class Method Details

.from_hash(hash) ⇒ Object



494
495
496
# File 'lib/crawlberg/native.rb', line 494

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


490
491
492
# File 'lib/crawlberg/native.rb', line 490

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = true

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false