Sitemap

Automate Salesforce manual tasks using Puppeteer

1 min readJun 5, 2019

--

What is Puppeteer?

Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome or Chromium.

Puppeteer can be used to automate deployment tasks that cannot be automated via the Salesforce Metadata API

Controlling Salesforce with Puppeteer

Let’s automate a simple example : activating a user interface settings option that is unsupported by the Metadata API

As show below the automation will :

  1. Open the browser and login to the Salesforce org
  2. Access the setup menu
  3. Search for the “User Interface” in the setup and click the User Interface option
  4. Enable/disable the “Set Audit Fields upon Record Creation” and “Update Records with Inactive Owners” User Permissions option
  5. Save the changes
Press enter or click to view image in full size
Activating a User Interface option using Puppeteer

Here is the puppeteer script that is used to enable/disable the User Interface option

--

--

benahm
benahm

Written by benahm

Salesforce Technical Architect 👷‍♂️⚒️💻☁️