SFDX Selenium combines SFDX – a developer toolset for Salesforce development – and Selenium, a popular open-source framework for automating web browsers.
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:
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.
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.
Prerequisites
Create a “config/change-default-currency-locale.json” file with the following content:
{
"$schema": "https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/master/src/plugins/schema.json",
"settings": {
"companyInformation": {
"defaultCurrencyIsoCode": "English (Ireland) - EUR"
}
}
}
push_script: |
sfdx --version
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
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
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!
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.
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.
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:
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.
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.
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 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.
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.
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.
Plus teaming up helps you share code, manage dependencies, and optimize your workflows for maximum productivity and efficiency.