Skip to main content

๐Ÿงฉ Scripts and Jobs

In Fuyu, automation is powered by scripts โ€” declarative instructions that tell the cloud browser what to do.

When a script is executed, it spawns a job โ€” a live, isolated session that runs your automation step by step.


๐Ÿ“œ Scriptsโ€‹

A script is a file that contains commands like:

visit("https://example.com")
click("#login")
wait_for("#username", 5)
record("status", "logged_in")

Scripts can:

  • Navigate to pages
  • Click buttons and links
  • Fill out forms
  • Read content
  • Save structured output using record()

Scripts are stored in your account and can be:

  • Run manually from the dashboard
  • Called via the REST API
  • Reused as templates

โš™๏ธ Jobsโ€‹

Every time you run a script, a job is created.

A job:

  • Executes the script in a cloud-based Chrome browser
  • Tracks status, logs, and output
  • Can optionally include a live preview via VNC (test mode)
  • Has a unique ID and timestamp
  • Stores the final recorded data

You can monitor jobs from the Jobs tab or from each script's detail page.


๐Ÿงช Test Modeโ€‹

When launching a job, you can optionally enable test mode:

  • It opens a live VNC session so you can see what the script is doing
  • Useful for debugging and development
  • Test mode jobs cost slightly more credits due to resource usage

๐Ÿ“ฅ Outputโ€‹

During script execution, you can use:

record("key", "value")

to output structured data from the page. This is stored as a table and can be:

  • Viewed in the UI
  • Exported to .csv or .json
  • Accessed via the API

๐Ÿ“Š Job Statusโ€‹

Each job shows detailed info like:

  • Current status (queued, running, success, failed)
  • Runtime duration
  • Output data
  • Console logs (from print())
  • Errors, if any