exec script


Execute JavaScript code of a specified web page, or inline JavaScript.


Applicable Systems/Platforms

Use of this action to obtain value and exception message returned from the executed snippet of JavaScript code (for the variable and exception arguments) is supported on the following systems/platforms:

Valid contexts

This action may be used within the following project items: test modules and user-defined actions.


Applicable Built-In Settings

The following settings are applicable to this action: case sensitive, remove double quotes from cells, standard ASCII only, window wait.

Example - Case 1: Running a snippet of JavaScript

Action Lines



Example - Case 2: Retrieving a return value

Suppose that you would like to get a value returned from the following snippet of JavaScript code.

function addNumber(num1, num2){var sum=num1+num2; return 'Total is '+sum;}; return addNumber(1, 2);

Action Lines


Copyright © 2023 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1(800) 322-0333