Limited Time — Lifetime Access for just $99. Lock in before prices rise.

UScraper
Back to block reference

Setup & Actions

Inject JavaScript block

Runs custom JavaScript in the page context.

Trustpilot (Imported)Status: draft
RunSavePreview Commands
process

Inject JavaScript

Run custom JavaScript in the browser.

Configure Block: inject-javascript

Set up the parameters for this inject javascript block.

ConfigurationGeneral

JavaScript Code

document.querySelector('.button')?.click();

Wait for completion

Enabled

Timeout

10 seconds
Navigate -> Wait for Element -> Inject JavaScript -> Structured ExportSave Configuration

Purpose

Use Inject JavaScript for advanced cleanup, DOM preparation, custom calculations, or interactions that are difficult to express with standard blocks.

How it works

  • Executes configured JavaScript inside the current browser page.
  • Can wait for completion before continuing.
  • Can return command results for inspection.

Configuration fields

FieldRequiredDefaultDescription
JavaScript CodeYes-Code to run in the browser context.
Wait for completionNotrueWhether UScraper should wait for the script to finish.
TimeoutNo10Maximum seconds for script execution.

Usage notes

  • Keep injected scripts small and deterministic.
  • Use standard blocks first; JavaScript is best for edge cases.
  • The script runs with page access, so avoid pasting untrusted code.
FAQ

Frequently asked questions

Here are some of our most common questions. Can't find what you're looking for?

View All FAQs

Stop writing scripts. Start scraping visually.

Download UScraper and build your first web scraper in under 10 minutes. No subscriptions, no code, no limits.

Available on Windows 10+ and macOS 12+ · Need help? [email protected]