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



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

def selector
  @selector
end

#textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



346
347
348
# File 'lib/crawlberg/native.rb', line 346

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

Instance Method Details

#click?Boolean

Returns:

  • (Boolean)


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

def click? = false

#execute_js?Boolean

Returns:

  • (Boolean)


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

def execute_js? = false

#press?Boolean

Returns:

  • (Boolean)


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

def press? = false

#scrape?Boolean

Returns:

  • (Boolean)


342
343
344
# File 'lib/crawlberg/native.rb', line 342

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

#screenshot?Boolean

Returns:

  • (Boolean)


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

def screenshot? = false

#scroll?Boolean

Returns:

  • (Boolean)


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

def scroll? = false

#type_text?Boolean

Returns:

  • (Boolean)


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

def type_text? = true

#wait?Boolean

Returns:

  • (Boolean)


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

def wait? = false