Class: Kreuzcrawl::PageActionExecuteJs
- Inherits:
-
Data
- Object
- Data
- Kreuzcrawl::PageActionExecuteJs
- Extended by:
- T::Sig
- Includes:
- PageAction
- Defined in:
- lib/kreuzcrawl/native.rb
Overview
Execute arbitrary JavaScript in the page context.
# Safety
The script runs with full page privileges in the browser context. Only execute scripts from trusted sources.
Instance Attribute Summary collapse
-
#script ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
- #click? ⇒ Boolean
- #execute_js? ⇒ Boolean
- #press? ⇒ Boolean
- #scrape? ⇒ Boolean
- #screenshot? ⇒ Boolean
- #scroll? ⇒ Boolean
- #type_text? ⇒ Boolean
- #wait? ⇒ Boolean
Instance Attribute Details
#script ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
537 538 539 |
# File 'lib/kreuzcrawl/native.rb', line 537 def script @script end |
Class Method Details
.from_hash(hash) ⇒ Object
572 573 574 |
# File 'lib/kreuzcrawl/native.rb', line 572 def self.from_hash(hash) new(script: hash[:script] || hash["script"]) end |
Instance Method Details
#click? ⇒ Boolean
546 |
# File 'lib/kreuzcrawl/native.rb', line 546 def click? = false |
#execute_js? ⇒ Boolean
564 |
# File 'lib/kreuzcrawl/native.rb', line 564 def execute_js? = true |
#press? ⇒ Boolean
552 |
# File 'lib/kreuzcrawl/native.rb', line 552 def press? = false |
#scrape? ⇒ Boolean
567 |
# File 'lib/kreuzcrawl/native.rb', line 567 def scrape? = false |
#screenshot? ⇒ Boolean
561 |
# File 'lib/kreuzcrawl/native.rb', line 561 def screenshot? = false |
#scroll? ⇒ Boolean
555 |
# File 'lib/kreuzcrawl/native.rb', line 555 def scroll? = false |
#type_text? ⇒ Boolean
549 |
# File 'lib/kreuzcrawl/native.rb', line 549 def type_text? = false |
#wait? ⇒ Boolean
558 |
# File 'lib/kreuzcrawl/native.rb', line 558 def wait? = false |