# Jump Steps By

This is a pre-built Action located under the **@Generic Element**. The functionality of this Action in Avo Assure is to skip the designed test steps based on the count provided in the input value and execute the extended design test steps. The execution result is stored in the dynamic variable.

{% hint style="info" %}
**Note**: Use this action at the exact step from where you want the jump to occur.
{% endhint %}

## Syntax &#x20;

**Input Value**: `<count of steps>`&#x20;

| Argument                                  | Description                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>\<count of steps></p><p>(Required)</p> | <p>Provide the number of test steps you want to skip. <br></p><p><strong>Note</strong>: </p><ul><li>Index starts from 1.</li><li><p>The behavior of this action changes based on the number you provide:</p><ul><li>Use a positive number to jump forward. For example: 3.</li><li>Use a negative number to jump backward. For exmple: -5.</li></ul></li></ul> |

&#x20;**Output Value**: `N/A`

| Argument | Description    |
| -------- | -------------- |
| N/A      | Not Applicable |

### **Example 1: Jumping Forward by Two Steps**

In this example, we explain how to skip two steps and continue execution from the third step ahead.

* **Action**: Jump Steps By
* **Input Value**: 2
  * The value (**2**) specifies that the execution skips the next two steps.
  * After skipping, execution resumes from the third upcoming step.
* **Logical Explanation**: The **Jump Steps By** action takes the value from the **Input Value** column (**2**) and skips two steps in the execution sequence. It then continues execution from the next available step, helping control the execution flow based on test logic.

### **Example 2: Conditional Jump Forward and Backward Based on IF–Else Condition**

In this example, we explain how the execution jumps forward or backward depending on whether the IF condition is True or False.

* **Action**: Jump Steps By
* **Input Value**: 3 (below Else block)
* **Input Value**: -6 (below EndIf)
  * The first input value (**3**) tells the **Jump Steps By** action to skip the next three steps when the IF condition is False.
  * The second input value (**–6**) tells the **Jump Steps By** action to move six steps backward when the IF condition is True, bringing execution back to the IF step.
* **Logical Explanation**: The **Jump Steps By** action takes the values from the Else block **Input Value** column (**3**) and after EndIf (**-6**) in a to control the flow based on the condition:

  * If the **IF** condition is False, Jump Steps By **3** skips three steps ahead to exit the conditional block.
  * If the **IF** condition is True, Jump Steps By **–6** returns execution to the **IF** statement, allowing the loop to repeat.

  This mechanism enables conditional looping and branching within a test case, allowing execution to continue or repeat based on runtime values.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2Fe3PuHr35JHXZsAsRkXtp%2Fif.png?alt=media&#x26;token=a21756ef-9cb2-4ee8-8691-19fe962ab6e9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** For better understanding, refer to the screenshot below.
{% endhint %}

{% hint style="info" %}
To better understand what is happening in the screenshot, refer to the information below:

**Positive Jump (Forward: 3 steps)**:\
When the **IF** condition evaluates to **False**, the action in the **Else** block uses the value **3**, which skips the next three steps and continues execution after them. This is useful when the ELSE section should be bypassed and execution must move to the next main step.

**Negative Jump (Backward: 6 steps)**:\
When the **IF** condition evaluates to **True**, execution continues normally until the **EndIf** step, where the value **–6** redirects execution backward by six steps to re-evaluate the IF condition. This is useful for repeating a section of the test until the condition changes.
{% endhint %}
