Difference between revisions of "Creating a Custom Command"
(Página nueva: Categoría: GXtest Guides Custom Commands give GXtest the flexibility to create new commands expressing action or validations to be performed in JavaScript language. == Creatin...) |
|||
Line 1: | Line 1: | ||
− | [[ | + | [[Category: GXtest Guides]] |
Custom Commands give GXtest the flexibility to create new commands expressing action or validations to be performed in JavaScript language. | Custom Commands give GXtest the flexibility to create new commands expressing action or validations to be performed in JavaScript language. |
Revision as of 20:59, 19 March 2010
Custom Commands give GXtest the flexibility to create new commands expressing action or validations to be performed in JavaScript language.
Creating a Custom Command
Open this menu to create Custom Command.
The following screen will open where you can enter the JavaScript code to be run when the command is run:
You need to choose a name, which will be used to reference it, and a description of the command.
Then you must choose the kind of command:
- Action
- Event
- Validation
Then you need to choose for which versions of GeneXus the command is valid.
In the JS text box, a JavaScript template is displayed that must be respected in order to implement the command.
If the JavaScript function is implemented it is possible to consult values from currentGXVersion and currentLanguage if it is necessary that different actions are necessary depending on these parameters. Además se les puede pasar un parámetro en ParamJS.
You will recieve OK from the result variable if everything went well or an error message if it failed.
Using a Custom Command
Once you have created a Custom Command it is ready to be used by GXtest the same way as any other native command, allowing you to add it and edit it manually.
The only limiting factor is the fact that you can't record it automatically using the toolbar.