# Inserting Steps into an Existing Test Case

When you create an automated test, you can choose to insert those recorded steps into an existing test case instead of having to re-record the test or create a template. You can also include additional actions, modify the test flow, or incorporate validation steps.

This is helpful so you can add individual steps at any location within a test case, create more efficient test maintenance, and quickly adapt to changing app requirements.

### Step Insertion Document Video

[Step Insertion Document Video](https://www.loom.com/share/85f1ce5717c04d828aabbb6c4a2eb1eb?source=embed_watch_on_loom_cta "Step Insertion Document Video")

## Steps to Insert Recorded Steps

1. Log in to your Sofy account.
2. Select **Device Lab** from the left navigation bar.  
   
3. Locate the device you want to test, then select **Acquire**.  
     
   Note: If a device is not available, the **Acquire** button will be grayed out.
4. Click **Launch** to open the device in a new window.  
   
5. Wait for the app to install, then navigate to the section in your app from where you want to start recording steps. For example: If you want to capture making a purchase in your app, start at the section in your app where you want to start the transaction.
6. Click the **Recording** tab from the right panel.
7. Select the **Start Recording** red button at the far right.
8. Check the **Auto-handle system dialogs** box to allow Sofy to automatically handle any system dialogs that pop up. If you wish to handle the system dialogs as part of your test case, leave this option unchecked.
   
   Note: Check this box only if you’re inserting the recorded steps into a test case that also auto-handles system dialogs.
9. Click **Continue From Here** to record the test from the current state of the app.

10. Interact with the device on the left and perform the desired steps you want to test in your app. Each step will be recorded and listed on the right.
11. Once you’re done recording your steps, click **Stop Recording & Save Steps** at the bottom of the page.

12. Click **Insert Steps** to insert the recorded steps into an existing test case or template.

13. Select the **Test Cases** or **Templates** tab, then search for and select the case or template in which you want to insert the recorded steps.

14. You may choose to insert steps either at the end of a test case or after a specific step per your use case. Click **Insert Steps** once you finalize your selection.
15. To view and edit the recorded steps, click **View Test Case**.

Your new steps will be added to the end of the test case or template and labeled with **Inserted Steps**.

16. If you want to make changes to any recorded step, click on the step and choose from the following options in the popup menu:
   1. **Edit**: Review the step’s details, add asserts, or configure a manual override.
   2. **Condition set on step**: Add a condition on the selected step.
   3. **Duplicate step**: Duplicate the selected step.
   4. **Reorder step**: Move any step somewhere else in the test case or template. Click, hold, and drag any step to its desired location, then select **I’m done**.
   5. **Disable step**: Disable the selected step. When a test is run, this step will be skipped.
   6. **Delete step**: Remove the step entirely from the test case or template.  
      
17. Click **Save Test** once you’ve finished configuring the test case or template.
