Class: Crawlberg::PageActionTypeText

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

Overview

Type text into 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



288
289
290
# File 'lib/crawlberg/native.rb', line 288

def selector
  @selector
end

#textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



288
289
290
# File 'lib/crawlberg/native.rb', line 288

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



319
320
321
# File 'lib/crawlberg/native.rb', line 319

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


315
316
317
# File 'lib/crawlberg/native.rb', line 315

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = true

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false