Skip to content

Secrets and signing in

Many sites ask you to sign in. Allgreen lets you do it without writing a password in a plan, and without signing in again in every plan.

A secret is a private value your plans use: a password, a card number, a code. A plan never holds the value itself, only the secret’s name.

The Secrets page

A secret name uses capital letters, digits and underscores, and starts with a letter: PASSWORD, SITE_PASSWORD, CARD_NUMBER. When you type a name, spaces become _ for you.

You can add a secret in two places:

  • On the Secrets page. Open Secrets in the sidebar. Under Add a secret, type a Name and a Value, then click Add.
  • From a step. In a step that types or picks a value, turn on Use a secret. Choose a name in Secret, or type a new one. If it has no value yet, a Value of … field shows: type the value and click Set. It is saved at once, on this computer only.

These steps can use a secret: Fill in a field, Choose in a list, Check a field (its value) and Check an element (has an attribute).

On the Secrets page, each secret shows Value saved or No value yet. To change a value, type it in its row and click Set. Clear removes the value.

Secrets stay on your computer.

  • In the desktop app, they are kept in your computer’s keychain (the system’s password store).
  • With the command line, they are kept in allgreen/secrets.local.json, in your project folder. Allgreen marks that file so that Git leaves it out. Do not share it.

Once saved, a value is never shown again, not even to you. If you forget it, set a new one.

In the plan editor and in reports, a step that uses a secret shows •••• in place of the value, for example: Fill “Password” with ••••. Reports and the command line output never contain secret values.

When you use Record in browser and type in a password field, Allgreen does not write what you typed into the plan. It keeps it as a secret, named after the field (a field called “Password” gives PASSWORD), and the step uses that secret. At the end, the recorder tells you which secrets it created.

Most plans need you to be signed in. Instead of repeating the sign-in steps in each plan, write them once, in a plan of their own:

  1. Create a plan, for example “Sign in”, that goes to the sign-in page, fills the email and the password (with a secret), clicks the button and checks that you are signed in.
  2. Open Project settings and, in The site, choose it as the Sign-in plan. Click Save.

Now the sign-in plan runs first, on each browser and device. Allgreen keeps the session it opened (the cookies that say “this person is signed in”) and every other plan starts signed in with it. On the Plans page, the plan shows a Sign-in label.

  • When you run a single plan, the sign-in plan runs too, first.
  • If the sign-in plan fails, the other plans cannot start signed in: they show as Not run. Fix the sign-in plan first.
  • Record in browser starts signed in too, with the session of the last run that saved one. If there is none yet, run your plans once first.

Some test sites show a browser sign-in window before anything else (this is called HTTP or “Basic” authentication). A plan cannot fill that window, but the project can answer it for you:

  1. Open Project settings.
  2. In The site, under Protected access, turn on The site asks for a password before showing anything.
  3. Fill in the User name.
  4. In Password, choose or type the name of a secret, for example SITE_PASSWORD.
  5. Click Save, then give the secret a value on the Secrets page.

Every plan, on every browser and device, then gets past that window.