GXtest Recorder is a Chrome extension designed to facilitate the recording, editing and playback of UI tests using GXtest.
GXtest Recorder can be downloaded from the Chrome Web Store.

The extension needs to have local file access permission in order to execute file-related commands. To enable this permission, please go to the extension details page (chrome://extensions/?id=edbiefalppkhegcephbbcojpibobbdbd) and enable the option "Allow access to file URLs"

Once you start navigating on the recorder tab, GXtest Recorder will be capturing and adding different commands to your recording.
To start recording, simply press the record/stop button, it should turn red to indicate the recording has started.

After that, just return to your browsing window and the recorder will record your actions. Once you are done the workflow, press the record/stop button to stop the recording.
Add assertions
During the recording, you can always add test validations (like checking some control's text or value) by using the Chrome context menu by right-clicking elements on the web page.

After recording, you can always modify the flow of your tests using the recorder. To open the command action menu, right-click on any command.

Add command
To add a command, select ‘Add command’ in the command action menu. Note the command will be added after the current selected one.
Edit command
To edit any command, left-click it and updates its values in the command editor below.

The target and value fields type or requirement will be dependent on the command selected.
In case the command accepts a selector as a target, you can use the ‘Select’ button and selecting the element on the web page, to get its selectors automatically.
The find button will highlight the current target element on the webpage.
Delete command
To delete a command, click ‘Delete command’ on the command action menu.
To update a command order you can click and drag the command to the selected position.

In this table you can find the supported commands by GXtest Recorder.
Command
|
Mode
|
Target
|
Value
|
Go
|
Auto
|
URL
|
-
|
SwitchFrame
|
Auto
|
"index=0" (Select the first frame of index 0)
"relative=parent" (Select the parent frame)
"relative=top" (Select the top frame)
|
-
|
CloseWindow
|
Auto
|
Auto-generated
|
-
|
ClickBy
|
Auto
|
Locator
|
-
|
DoubleClickBy
|
Auto
|
Locator
|
-
|
MouseDownBy
|
Manual
|
Locator
|
-
|
MouseMoveBy
|
Manual
|
Locator
|
-
|
MouseUpAt
|
Manual
|
Locator
|
-
|
DragBy
|
Auto
|
Locator of element to be dragged
|
Locator of the element in which to drop the target
|
KeysBy
|
Auto
|
Locator
|
A character. For example: "${KEY_ENTER}"
|
SubmitBy
|
Auto
|
Locator
|
-
|
TypeBy
|
Auto
|
Locator
|
Text to be set
|
EditContentBy
|
Auto
|
Locator
|
The string to be set to the content of the target element. Needs to have attribute contenteditable="true"
|
SelectBy
|
Auto
|
Locator
|
An option locator. For example: "label=option1"
|
FileUploadBy(*)
|
Auto
|
Locator
|
Complete path of the file to be uploaded. For example: "C:\example-folder\file.zip"
|
AssertAlertText
|
Auto
|
The expected alert message
|
-
|
AssertConfirmation
|
Auto
|
The expected confirmation message
|
-
|
chooseOkOnNextConfirmation
|
Auto
|
-
|
-
|
chooseCancelOnNextConfirmation
|
Auto
|
-
|
-
|
echo
|
Manual
|
The string to be printed in the log console. Variable declared in the storeXXX commands can be used in the string. For example: "Hello ${var_usr}"
|
-
|
PauseFor
|
Manual
|
-
|
The amount of time to sleep in milliseconds.
|
ScriptEval
|
Manual
|
The Javascript code to be run. For example: "var a=10; var b=10; console.log(a+b);"
NOTE THAT: Avoid using alert(), prompt(), and confirm(). These three functions will not take effect while running. Please use console.log() to log messages instead.
|
-
|
AssertTextBy
|
Context menu
|
Locator
|
The expected text of the target element (Exact matching). Variable declared in the storeXXX commands can be used in the string. For example: "Hello ${var_usr}"
|
AssertTitle
|
Context menu
|
The expected string of the title (Exact matching). Variable declared in the storeXXX commands can be used in the string. For example: "Hello ${var_usr}"
|
-
|
AssertValue
|
Context menu
|
Locator
|
The expected value of the target element (Exact matching). Variable declared in the storeXXX commands can be used in the value. For example: "Hello ${var_usr}"
|
GetTitle
|
Context menu
|
The title to store (auto-generated)
|
The name of the variable to store the title. For example: "var_title"
|
GetText
|
Context menu
|
Locator
|
The name of the variable or store the target element’s text. For example: "var_text"
|
GetValue
|
Context menu
|
Locator
|
The name of the variable o store the target element’s. For example: "var_text"
|
Auto: Automatically captured by user input when recording
Manual: Not recorded automatically, should be added manually after recording.
Context menu: Manual mode and located on the context menu
(*) The command FileUploadBy requires extra permission to be able to access the files to upload. Check the installation notes to enable this permission.
This is the first action that you usually want to take in order to validate that the sequence of commands recorded is doing what you want.
If you want to debug the recording, a breakpoint can be added by clicking ‘Toggle breakpoint’ in the desired command action menu.

Log
Each playback will generate a log containing detailed information about the run with the option to be saved.
It is possible to backup or loads previous recordings. You can save your recording by clicking the save button , to later open it by clicking .

To bring the UI test to GeneXus IDE, transforming the recording into a KB test object. To create UI Test inside GeneXus IDE, download the test case using GeneXus code just click the ‘DOWNLOAD’ button. A file containing the exported test will be downloaded, ready to be loaded in the GeneXus IDE.

Due to technical limitations, the recording of autocomplete fields is currently not supported. In case you need to record the action on an autocomplete field, it is advisable to first empty the field and then do the action.
|