Go Back
Navigates to the previous page in the browser history.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing the node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
if ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.
Input
- Page Id - The id of the page where the go back action will be executed. This ID is generated by the Open Browser node.
- Times - The number of times the go back action will be executed. Default value is 1.
If you leave the Times field blank, the default value is set to 1.
How It Works
- The node receives the Page ID and Times parameter
- It validates that the Page ID is not empty
- It waits for any configured delay before execution
- It retrieves the active page session using the provided Page ID
- It validates that Times is greater than zero
- The node executes the browser back navigation the specified number of times in a loop
- Each back navigation moves to the previous page in the browser history
- The node applies any configured delay after execution
Requirements
- An active browser session created by the Open Browser node
- A valid Page ID from the Open Browser node
- Browser history must have previous pages to navigate back to
- The Times value must be greater than zero
Error Handling
| Error Code | Description |
|---|---|
| Core.Browser.GoBack.ErrOnCreate | Configuration parsing error during node creation |
| Core.Browser.GoBack.ErrOnMessage | Error parsing incoming message data |
| Core.Browser.GoBack.ErrPageId | Page ID is empty or not provided |
| Core.Browser.GoBack.ErrSession | Invalid or expired Page ID, session not found |
| Core.Browser.GoBack.ErrTimes | Times value is zero or negative |
| Core.Browser.GoBack.ErrBack | Failed to navigate back in browser history |
Usage Examples
Example 1: Simple Back Navigation
When you need to return to the previous page:
1. Use Open Browser and navigate to a starting page
2. Click links to navigate to different pages
3. Use Go Back with:
- Times: 1
4. The browser returns to the previous page
5. Continue with your automation
Example 2: Multi-Level Navigation
When navigating through multiple pages and need to return several steps:
1. Start at homepage
2. Navigate through: Home → Category → Product → Details
3. Use Go Back with:
- Times: 3
4. Browser returns directly to the Category page
5. Access different products from the category
Example 3: Form Validation Workflow
When testing form validation requiring multiple attempts:
1. Navigate to a form page
2. Fill in form fields with test data
3. Submit the form
4. If validation fails, use Go Back with Times: 1
5. Modify the form data
6. Resubmit and repeat as needed
Usage Notes
- Go Back relies on the browser's history stack
- If Times exceeds available history, the node will fail
- Going back does not trigger a full page reload unless required by the page
- Form data may be preserved when going back (depends on the browser and page)
- JavaScript state and dynamic content may be restored to previous state
- Cannot go back if there are no previous pages in history
- The default value for Times is 1 if not specified
Tips
- Use Times carefully to avoid going back beyond the available history
- Consider adding a delay after going back to allow page stabilization
- For single-page applications (SPAs), browser back may not work as expected
- Test your automation to ensure back navigation doesn't break page state
- Combine with URL validation to confirm you're on the expected page after going back
- For complex workflows, track navigation history to determine appropriate Times value
- Use Go Back sparingly in production automations as it depends on navigation order
Related Nodes
- Open Browser - Creates the browser session and Page ID
- Go Forward - Navigates forward in browser history
- Refresh - Reloads the current page
- Open Link - Navigates to a new URL