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



230
231
232
# File 'lib/crawlberg/native.rb', line 230

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



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

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = true

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


252
253
254
# File 'lib/crawlberg/native.rb', line 252

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false