Back to Previous Page

Returns to the previous browser web page.

Command availability: IBM RPA SaaS and IBM RPA on premises

Description

This command returns to the previous browser web page without adding to the browser's history. Forward or backward browsing, in this case, occurs only with cached content while the browser is active, similar to what happens in incognito browsing.

Script syntax

IBM RPA's proprietary scripting language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.

webGoBack

Dependencies

Use the Start Browser (webStart) command to start a browser or use the Find Internet Explorer Browser (findBrowser) command to attach the Microsoft Internet Explorer before using Back to Previous Page (webGoBack) command.

Example

After navigating to the "Google" homepage and subsequently the IBM homepage, the Back to Previous Page command returns to the previous page.

// Starts the browser.
webStart --name browser --type "Chrome"
// Navigates to Google homepage.
webNavigate --url "google.com"
// Waits 3 seconds.
webWait --timeout 00:00:03
// Navigates to IBM homepage.
webNavigate --url "https://www.ibm.com"
// Waits 3 seconds.
webWait --timeout 00:00:03
// Returns to the previous page.
webGoBack
// Closes the browser.
webClose --name browser --leavebrowseropen