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



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

def selector
  @selector
end

Class Method Details

.from_hash(hash) ⇒ Object



310
311
312
# File 'lib/crawlberg/native.rb', line 310

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = true

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


306
307
308
# File 'lib/crawlberg/native.rb', line 306

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = false

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false