Troubleshooting
Unable to connect to your Salesforce environment
To connect to your Salesforce environment, ensure that the Salesforce environment meets the following requirements:
- Support API access - This requires Enterprise, Performance, Unlimited, and Developer Edition orgs. Professional Edition orgs can add API access as an add-on. Salesforce Essentials Edition does not support API access.
- REST API is enabled for the selected user to connect to the Salesforce environment in Administration > Users > Profiles.
- Whitelist the following IP addresses in Settings > Security > Network Access.
- 35.85.13.117
- 44.228.217.52
- 54.245.105.236
- 54.214.4.125
-
Whitelist additional IP address being blocked. Check in the Login History for “Restricted IP” addresses that are being blocked for the application “Testim for Salesforce” under Settings > Identity >Login History.
Scheduled test executions on the Grid are failing
If your tests are successfully executing locally, but failing on the Grid we suggest the following:
-
Identity and Access Management (IAM) services such as Azure Active Directory or Okta may be interfering with the test execution. Possible solution - We recommend disabling IAM service for test accounts. Execute the test locally in incognito mode to emulate running a test on the Grid.
-
IP addresses may be blocked. Possible solution - Check in the Login History for “Restricted IP” addresses from the application "TTA for Salesforce" under Settings > Identity >Login History.
-
Remove the following restrictions that maybe preventing outside access from the Grid:
-
IP address range (Company level) - under Settings > Security > Network Access.
-
IP address range (Profile level)- under Settings > Users > Profile > Login IP Ranges.
-
Login Hours (Profile level) - under Users > Profile > Login Hours.
If IP address restrictions are required, please Contact Support (https://www.testim.io/contact-us/) for the required IP addresses to whitelist.
-
Test execution fails in the first test step
Test execution may fail in the first test step when there is a conflict with other Chrome extensions. We recommend you to isolate the test execution to have only the Tricentis Testim extension enabled. To do so, follow these steps:
-
Configure the Tricentis Testim extension to run in Incognito mode.
-
Run the test in Incognito mode.
Cannot find a record in Salesforce (by using the Find step) that was created in a previous step using the Create step
When creating a record in Salesforce using the Create step, there may be a time delay until the record is actually created in Salesforce and can be found using the Find step. The solution is to add a step that includes a Custom condition that repeatedly searches (in a loop) for a Record until it is found or until it has retried for a set number of times and only then it will proceed to the next step.
The step that is added with the custom condition can be found as a Shared Step in the demo project here - https://tta-crm.tricentis.com/#/project/WPZPXX3rnCpFZOSFPzYi/branch/master/test/FXeyB01zXmzQmAfs
All you have to do is to add this shared step to your test.
In the demo test the Create step is followed by the shared Find step.
The Find step includes a Custom condition to repeat the step until the record is found or up to four times:
This is the custom condition code (click the Edit link next to Custom to view):
The custom code is set to repeat this Shared Group until the Record is found or it has tried searching for the Record four times.
The Find Account shared steps includes two inner steps (double click the step to access):
-
Find step - a find step to find the record:
-
Sleep step - a sleep step to wait for the next iteration.
Automation using the Salesforce Recorder is not selecting a value from a Salesforce pick-list
Salesforce pick-lists are challenging to automate. When recording a selection you need to select the text in the pick-list, avoiding any blank space.
Test is failing to find a field but it is in the Salesforce Step
This maybe due to the following reasons:
- Salesforce account you are executing the test with may not have read permission to view this field.
Possible solution - to view the field permissions for this account, add a Permission Validation test step and view the permissions. - Page Layout for the Salesforce account you are executing the test with maybe configured without this field.
Possible solution - to validate the Page Layout check your Settings in Salesforce.
Salesforce test execution fails on the Grid with “Element not found” but the test passes Locally
There are 2 possible reasons for this:
-
Salesforce page load times maybe different between Grid and Local execution. Unexpected additional page load times can cause this timeout error.
Possible solution - Prior to the failing test step, add the Salesforce step Wait for Page Load. This step pauses test execution until the Salesforce page has completed loading. -
Browser window size was changed by the user during the Local recording or Local execution of the test.
Possible solution - We recommend not to re-size the browser window so that it remains the same size as when the test is executed on the Grid.
Concurrent Salesforce test executions are failing because a user gets logged out
Salesforce only allows concurrent logins from an account that has been authenticated with username/password, not with Sign-in with Salesforce (OAuth).
Possible solution - For concurrent test executions, use a Persona that has been authenticated with username/password. For more information, see Creating a persona.
When recording a test a step is missing
The recorder offers two modes of operation:
- Salesforce mode - in this mode, which is indicated by a cloud icon on the recorder , the recorder performs Salesforce steps, which enable the performance of multiple actions within a single step. The steps created using this mode are marked with a cloud icon.
- Web mode - this is the regular mode of the recorder, which is indicated by a crossed out cloud icon on the recorder. In this mode every interaction (e.g., click, scroll, add text, etc.) is represented by a separate step.
Possible solution - If you notice that the recorded steps are not appearing in the editor, you should turn off Salesforce mode by clicking on the cloud icon. For more details, see Recording Steps.
Fields are not present in a Salesforce Step
There are 2 possible reasons for this:
- Salesforce Steps only contain those fields in the sObject's Page Layout (for both Classic and Lightning). It does not include fields that have only been added using the Lighting App Builder. Your Salesforce admin may have excluded a field in the Page Layout, but added it when creating a Dynamic Form using the Lightning App Builder. To use the Salesforce steps, in your Salesforce Setup add the field to the Page Layout, or use the Salesforce Recorder when authoring your tests.
- Salesforce Steps only contain fields for which the Salesforce account that is used to connect your Salesforce environment, has
read
permission to. To check if the desired field has the required permissions within the logged-in account, add a Permission Validation test step and view the permissions. You may need to reconnect your Salesforce environment with another Salesforce account that has the relevantread
permission to see the missing field.
Updated 4 months ago