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



256
257
258
# File 'lib/crawlberg/native.rb', line 256

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



283
284
285
# File 'lib/crawlberg/native.rb', line 283

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = true

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


279
280
281
# File 'lib/crawlberg/native.rb', line 279

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false