Selenium Setup

Updated 3 months ago by Copado Solutions

Initial Setup

  1. In your Copado org, create a new org credential for your Copado user (in case you don't have one already). 
  2. Make sure you have a Copado API key.
  3. On Salesforce's side, navigate to Setup > File Upload and Download Security and make sure the checkbox Don't allow HTML uploads as attachments or document records is not enabled, otherwise, Selenium won't work.
  4. Install the Copado Selenium IDE:
    1. If you are not using Copado EU, install from here.
    2. If you are using Copado EU, install from here.

    If you are not sure which Copado server you are using, please check with our Customer Success team.
  5. Restart  your browser.
  6. Continue with Bind the Extension to the Copado Org.

Bind the Extension to the Copado Org

The extension needs to know the Salesforce org where Copado is installed, to load/save the test cases. This can be achieved in two ways:

  1. Navigate to the Selenium Getting Started tab in the Copado application.
  2. Click on the Copado Recorder Extension icon to grant access to the site, then click again if necessary.
  3. Click on Bind Copado Extension to this org.
If you do not see the button, please make sure you complete this step in Classic mode, or follow the alternative:
  1. Go to the Copado Recorder Extension, open the Options section.
  2. Set the Copado API URL (provided by Copado) and your Copado API key, available in the Account Summary tab.

Set Up a WebDriver Provider

  1. You need a WebDriver. You can use BrowserStack, Sauce Labs, CrossBrowserTesting or any other generic Selenium grid. Create a new Selenium Settings record and set your account information for the selected provider:
    1. If using BrowserStack, log in to your account, open your settings page (Accounts > Settings) and find your Username and Access Key. Copy these two values and paste them in one of the following WebDriver URL links:
      http://<Username>:<AccessKey>@hub.browserstack.com/wd/hub or
      https://<Username>:<AccessKey>@hub-cloud.browserstack.com/wd/hub (for HTTPS)
    2. If you are using SauceLabs, log in to your account and find your Access Key (Account > My Account > Access Key). Paste the Username and the Access Key in the following WebDriver URL link:
      http://<Username>:<AccessKey>@ondemand.saucelabs.com/wd/hub
    3. If you are using CrossBrowserTesting, log in to your account and find your Auth Key. Paste the Username and the Auth Key in the following WebDriver URL link:
      http://<Username>:<Authkey>@hub.crossbrowsertesting.com:80/wd/hub
If the username part is an email, the email must be escaped to fit in a URL format, e.g.: for a xxx@yyy.com it should be written as xxx%40yyy.com.

How to Start Recording a Test Case

To start recording a test case, follow these steps:

  1. Navigate to the starting page ( e.g. Salesforce's Home tab ).
  2. Click on the Copado Recorder Extension icon to grant access to the site, then click again to open the extension if necessary.
  3. Select the Recording checkbox.
  4. Start recording the test case.

If you grant permissions when you click only, keep on the lookout for changes to the site (e.g. from .salesforce.com to .force.com ), because the extension might stop recording, and the Copado Extension icon will change from

 to

(notice the slight white circle surrounding the icon), and you will need to click on it again to continue recording.

If you wish to prevent possible site switches and preserve the ease of recording, read the section Grant/Revoke Copado Extension Access to All Sites.

How to Open a Test Case

To open a test case, follow the steps below:

  1. Navigate to the starting page (e.g. Salesforce's Home tab).
  2. Click on the Copado Recorder Extension icon to grant access to the site, then click on the Open link.

Upgrade Instructions

This release of the Copado Selenium Recorder contains updates to align with the most recent security guidelines recommended by Google. You can fine-tune the permissions after installing by following the instructions under Grant/Revoke Copado Extension Access to All Sites.

If you experience any issue opening or saving test cases, please try to bind the extension to the Copado org. For more information about this check out the section Bind the Extension to the Copado Org.

Details of the Recorder Usage and Required Permissions

The Copado Selenium Recorder requires broad host permissions upon installation, but it can be configured to require the user's permission before accessing a site, via the user's actions, e.g. clicking on the recorder extension icon:

This extension needs access to the current tab and any site it navigates in order to detect the user's actions and record a testing script mimicking those actions.

Since Salesforce uses multiple sites/domains/custom domains during navigation, each site change requires the user to grant permission to the site when recording test cases, for binding the extension, or opening existing test cases.

To minimize interference and improve security when you are not recording, Google Chrome offers the possibility to reduce the permission level, or temporarily disable the extension. For more details about how to enable this, read the section below.

Grant/Revoke Copado Extension Access to All Sites

If you wish to avoid any potential site switches, you can grant the Copado Extension access to all sites. To do this, follow the steps below:

  1. Right-click on the Copado icon.
  2. Locate the option This can read and change site data and select on all sites:

This will grant the extension permission to record every site.

Consider the security implications of this behavior, since the Extension will have access to every site you navigate.

If you want to revoke this permission, follow these steps:

  1. Right-click on the Copado icon.
  2. Locate the option This can read and change site data and select when you click the extension.

An alternative approach is to simply enable/disable the extension when you start or finish recording, and

Google Chrome offers the possibility to quickly enable/disable extensions with the on/off switch in Menu -> More Tools -> Extensions -> Copado Selenium Recorder.


How did we do?