Skip to content

Repeat browser tasks: recipes and walkthroughs

Some work only happens in a web page: filling in a test application, clicking through Salesforce Setup, checking a screen after a release. sfe has its own Chrome for that, the sfe Chrome, with its own profile and our sign-ins saved in it. In it, sfe can do three things that save the most time:

  • Jump straight to a page: Setup, a flow, an object, a record, a Copado story, with one command.
  • Record a task once and replay it: we do the task while sfe watches, it saves the steps as a recipe, and next time one command does them, with new values filled in.
  • Make a walkthrough: numbered screenshots with a caption each, put together as a page and a PDF, for a test record or for teaching someone.

Video, about one and a quarter minutes, with narration and captions.

Words we use on this page

  • The sfe Chrome: a Chrome that sfe starts with a profile of its own, kept apart from our everyday browser. It is set up once: ServiceNow and the sfe browser.
  • Route: a memorised way to a page, such as flows or copado-story.
  • Recipe: a task recorded once: the pages it went through, the fields it filled and what it clicked. The values it typed become blanks we fill in each time.
  • Walkthrough: a folder of numbered screenshots with captions, a README and a PDF.

Before you start

  • The sfe Chrome is set up and signed in to the sites we need: sfe browser setup once, then sfe browser start.
  • The screens below are from a working install, where one recipe and four walkthroughs are already kept.

Steps

1. Jump to a page

sfe browser go flows
sfe browser go flow Send_Welcome_Email -e qafull
sfe browser go copado-story US-0032392

Each route knows the address, so there is no clicking through menus. sfe browser routes lists them all: Setup, flows and their versions, Apex classes, objects and their fields, validation rules, records, users, permission sets, the audit trail, debug logs, deployment status, Copado stories and promotions, and every recipe the team has recorded. The built-in routes open Salesforce and Copado pages, so a pack without Salesforce or Copado shows only its recipes.

2. Record a task once

We start a recording, do the task in the sfe Chrome as we always do, and stop.

sfe browser record start register-test-applicant
# ... do the task in the sfe Chrome ...
sfe browser record stop

The record commands: start, status and stop

sfe notes each page it went to, each field it filled and each thing it clicked, and saves them as a recipe. The values we typed are not kept: each field becomes a blank to fill in next time. A password field is never noted. The recording can also be done in the background while a person, or an agent through the browser tools, does the task.

3. Replay it

sfe browser routes | tail -12

The recipes kept on this Mac, with the values each one takes

The recipe here was recorded once, on the stage enrollment portal: signing a new test applicant up for a nursing program. It takes nine values, from the email address and the name to the program. Next time, one command does the whole form with new values:

sfe browser go stage-register-sse-nursing-application --set "Email Address*=new.tester@example.com" --set "Legal First Name=Test"

The replay stops before any button that saves, sends or deletes, so the last click is always ours. A recipe kept in the pack is shared by the whole team; one kept on this Mac is our own.

4. Make a walkthrough

At each screen worth keeping, one command saves a numbered screenshot with a caption. Password fields are blanked first.

sfe browser step "Setup home in QAFull"
sfe browser step "The flow, open in Flow Builder"
sfe browser pdf my-walkthrough
sfe browser walkthroughs

The walkthroughs on this Mac, with the number of steps and the PDF of each

Each walkthrough is a folder with the screenshots, a README that reads like a short guide, and a PDF to send to someone.

Keeping it safe

  • The sfe Chrome has its own profile. sfe never uses our everyday Chrome, and it will not take over a Chrome on its port that is not its own.
  • A pack can limit the sfe Chrome to the team's own sites.
  • sfe browser read reads a page's text with one script and clicks nothing. Only a recipe or a person clicks.
  • While it runs, the sfe Chrome keeps a debugging port open on this Mac (localhost, port 9222 unless the settings say otherwise), with our sign-ins live in it. Any program running under our account on this Mac can drive it through that port. We close the sfe Chrome when we do not need it, and keep only the team's sites signed in there.

If something goes wrong

What we see What it means What we do
something answers on port 9222, and it is not the sfe Chrome Another Chrome holds the port. Close it, or give the sfe Chrome another port in our settings.
A recipe stops at a sign-in page The sign-in in the sfe Chrome has ended. Sign in once in the sfe Chrome, then run the recipe again.