Creating Selenium Test Cases

Updated 5 days ago by Copado Solutions

Creating Selenium Test Cases

To create a new Selenium test case go to the Copado Selenium Testing application and follow the steps below:

  1. Click on the Selenium Test Cases tab.
  2. Click on New.
  3. Enter a name for the test case. It is a good practice to add a prefix to test cases' names depending on the type of testing. For example, if the test case you are creating is part of the regression tests pack, add an “RT_” prefix to its name to better identify it and make searches easier. You can use the same criteria for other types of tests (AC for acceptance tests, UT for unit tests, etc.).
  4. Click on Save.
  5. Open Copado Recorder and start reproducing the case's steps. Do not forget to check the Recording button.
  6. Once you are finished, save the recording. You can continue editing or even remove all the steps with the Clear test case button. To learn more about Copado Recorder, check out the article Useful Tips & Commands When Recording Test Cases.

A test case is often referred to as a test script when written. Within Copado, a Selenium test case is typically created and edited with the Copado Selenium IDE, but experienced users can create and edit Selenium test cases manually. When a test case is recorded using Copado Recorder, interactions on Salesforce or your website are captured automatically and assertions can be made based on the expected output.

Copado Recorder Prerequisites

To work with Copado Recorder you will need to take into account the following points:

  1. First of all, follow the instructions provided in the article Selenium Setup. You will have to bind the Copado Selenium IDE to the org and configure your Selenium settings.
  2. When a Selenium test case is created, the recording will use the default values generated with every step. 
  3. Use the + new dataset button to override the recorded values and reuse the same script with different data. Then, created datasets will be available when creating a Selenium test suite.
  4. Copado allows you to track versions of Selenium test cases. See the article Versioning Selenium Test Cases to learn more.

How did we do?