Difference between revisions of "Creating a Custom Command"

From GXtest Wiki
Jump to: navigation, search
(Creating a Custom Command)
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ipelasuq.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
 +
----
 +
=[http://ipelasuq.co.cc CLICK HERE]=
 +
----
 +
</div>
 
[[Category: GXtest Guides]]
 
[[Category: GXtest Guides]]
  

Revision as of 01:33, 24 November 2010



Contents

Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly


CLICK HERE


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.

AccesoCustomCommand.jpg

The following screen will open where you can enter the JavaScript code to be run when the command is run:

CodigoCustomCommand.jpg

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 (v8, v9, v10, undefined) and currentLanguage (java, net, undefined) 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.

Useful suggestions

In order to creat the JS function easier, you can use any tool like Web Developer from Google Chrome, or Firebug in Firefox, to look the elements which you can use to do different actions.

For example, if we want to do a command to access a menu developed with JavaScript, with these tools we can see how the navegation is performed, even if it is done with an event of if it is generated with a dinamic link.

After that you have to see how this Javascript works. If the menu is allocated on memory, perhaps it is better to interact with javascript directly with that objects. If it is not, you should interact with the 'document' object, or with 'this', to ask for an specific object on the html.