Log In As

The Log In As step can be used by Admin user only. This means that before the Log In As step you will need to add a Log in step in which the test will log in to your Admin account. After it logs in as an Admin, you can use the Log In As step to log in as different users within a single test.

To add a Log In As step:

  1. In the editor, add a step by clicking the + button.

  2. Under the Salesforce steps tab, click Common operations and select Log in step.
    The following Properties Tab is displayed:

  3. Click Connect to Salesforce.
    The following dialog is displayed.

  4. Configure the following settings:

    1. Select type - select the environment type - Production/Sandbox
    2. Environment Name - enter the name of the Salesforce environment.
    3. Select Existing Branch - select the branch you want to log in to.
  5. Enter your Username and Password.

  6. Add a Log in as step by clicking the + button and under the Salesforce steps tab, click Common operations and select Log in as step.
    The following Properties Tab is displayed.

  7. In the Input Username field, enter the user name by doing one of the following:

    1. Username string - to enter a username as a string type the string into field. The string is automatically surrounded by a single quotation mark.

    2. Username variable - You can also enter JavaScript code and use a variable for the username so that each execution of the test will use a unique username from the test data. Click the T icon and enter a JS code. See Data-driven testing to learn more.

  8. In the Navigation options section, select any of the following options:

    1. Stay on current page after log in as - select this option to ??
    2. Return to current page after log out - select this option to ??
  9. At the end of the test, add a Log out step, to switch back to Admin so that you can log in as a different user again.

  10. When done, click Save to save the test.