Class: Crawlberg::PageActionClick

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

Overview

Click on an element matching the given CSS selector.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#selectorObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



392
393
394
# File 'lib/crawlberg/native.rb', line 392

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



419
420
421
# File 'lib/crawlberg/native.rb', line 419

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = true

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


415
416
417
# File 'lib/crawlberg/native.rb', line 415

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false