How To Configure Browser Automation Through SFDX Selenium

SFDX Selenium combines SFDX – a developer toolset for Salesforce development – and Selenium, a popular open-source framework for automating web browsers.

How To Configure Browser Automation Through SFDX Selenium
Table of contents

It allows developers to write automated tests for Salesforce applications using Selenium's capabilities.

It provides a way to interact with Salesforce user interfaces, perform actions, and validate results, making it a valuable tool for testing and ensuring the quality of Salesforce applications.

Some use cases for browser automation include:

  • UI testing
  • Applying configuration via browser automation, which is not supported in metadata API.
The aim of SFDX is to close the gaps in these non-supported metadata use cases. But there are still some gaps. 

That is why Hutte created an open-source command-line tool to help close the gap of applying configuration in the setup menu  –  “sfdx-browserforce-plugin.”

With other SaaS tools, there is no performing browser in Salesforce orgs.

With Hutte, you can run any script – including any browser automation of your choice – in a Docker container on our platform.

Hutte is truly one of the best tools that we use. Product owners, Salesforce solution architects, business analysts — anyone on our team can easily and visually accomplish the tasks that would otherwise take a lot of clicks, time, and coding.

Sebastian Lechner

Product Management Director of IPfolio

Source: Hutte

Hutte Browser Automation Recipe

To illustrate how you can change your browser automation configuration, Hutte has created a recipe.

This recipe uses the “sfdx-browserforce-plugin” to create the “Setup,” “Company,” “Information,” and “Currency Locale” in a scratch org using browser automation, as this is not supported in the metadata API.


  • A valid SFDX project
  • A “hutte.yml” file (for example, the default one shown in the “CONFIGURATION” tab).

Step One

Create a “config/change-default-currency-locale.json” file with the following content:

  "$schema": "",
  "settings": {
    "companyInformation": {
      "defaultCurrencyIsoCode": "English (Ireland) - EUR"

Step Two

  • Edit the “hutte.yml” file in your default branch
  • Add the following lines to the “push_script:”
push_script: |
  sfdx --version
  echo y | sfdx plugins install sfdx-browserforce-plugin
  export PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
  sfdx browserforce:apply -f config/change-default-currency-locale.json
  sfdx force:source:push -f --loglevel fatal 1>/dev/null

Step Three

  • Create a scratch org
  • Log in to the scratch org
  • Verify that the currency has been changed.

To get to know Hutte better, start your free 30-day trial, or check out our demo below.

If you’d like to find out how to create scratch orgs through Hutte, read on!

Visualize Git With Hutte

At Hutte, we enable you to visually leverage the benefits of Git-based development without needing CLI. We have removed the barriers Git can pose as Hutte is a web UI to SFDX that allows for visual Salesforce version control.

You can also create and manage Salesforce scratch orgs and sandboxes. There is no need for code, which means there is no hassle involved.

Furthermore, you don’t need to install or learn Git, as Hutte’s UI is already integrated into Git hosting tools, like GitLab and Azure.

From these hosting providers, you can also view the changes you made, including your pull request, in a line-by-line comparison format. 

There is no need to reproduce this data as everything is generated and integrated with Hutte.

Now, let’s get into how to create scratch orgs.

Create Scratch Orgs In A Collaboration-Friendly Environment

You can create scratch orgs that can be accessed together as a team. Various users can create their scratch orgs using the “New scratch org” button.

You can choose a Git branch from which you want to create your environment, and you can name it.

Your scratch orgs will be listed in one place showing you a historic overview or snapshot of your projects, apps, and codebases created in Git. This is a helpful feature as you and your team ultimately want to contribute to each other’s work.

Without Hutte, you need to rely solely on CLI. With Hutte, you can:

  • Easily make changes to the latest state of your source
  • Implement the new feature
  • Ship it to Git.

If a developer has executed new features and submitted it to Git, instead of them manually having to tell the team that they have provisioned an environment, the team can simply view it on the scratch orgs dashboard.

They will tell the team which branch they added the features to. You can then find the branches by “New scratch orgs.” From there, you can create a scratch org from that branch. It will appear in your list of scratch orgs.
  • You won’t need to run the code locally
  • It won’t block your machine, and it won’t block you
  • It will run asynchronously on Hutte’s infrastructure.

When your scratch org is ready, you won’t have to worry about user creation or any manual steps to build the org. Once you have logged into the scratch org, you can play around with it without affecting other users’ data.

Hutte essentially empowers users to easily manage and pick their own environments.

Pick A Scratch Org From The Pool

Hutte has a pool of orgs pre-created for you, so you don't need to wait, as you can spin them up visually. Picking a scratch org from the pool speeds up the process even further when you need an environment from the latest state of your source.

You can “Take from pool,” enter the name of the pool you want to claim, and it will appear in your pool.

You can dimensionate your pool by going to the “Settings.” As an addition, you can decide how big the pool is and what the duration of the pool will be.

Hutte’s Jira Plugin

If you use Jira, there will be a work item for it. Hutte’s Jira plugin will then find scratch orgs that reference the same name as your work item (or issue).

You, as a product manager, can then leave a comment to the developer that worked on the scratch org you selected. This enables collaboration without any interference or overriding of work already done by a developer.

Browser Automation Made Easy

Even though scratch orgs are intended to be workspaces where individuals can explore and test features in isolation, when you work together to automate web browsers, you can conquer challenges.

Obstacles like configuration management, non-supported metadata, and juggling multiple scratch orgs become more streamlined. 

Plus teaming up helps you share code, manage dependencies, and optimize your workflows for maximum productivity and efficiency.