Skip to main content
Version: 1.0.1

Project type

Manage the XPath setup for a group of elements with the same format across different operating systems.

XPath is the address or locator of an element on the interface of the application/system that needs to be tested.

A project can use the template of all project types available in the system.

alt text

Create New Project Type​

Step 1: Click on the Settings application. Go to Automation Test > Project Type

alt text

Step 2: Click NEW PROJECT TYPE, the system displays the Create Project Type screen.

alt text

Step 3: On the Create Project Type screen, fill in the necessary information, including:

Field NameMandatoryFormatConstraintsDescription
CodeYesTextMust be unique, cannot be edited, cannot contain special characters except for “_”Identifier code distinguishing different project types
NameYesTextEnter the name of the project type
Description-TextareaEnter a description for the project type
Default project typeYesComboboxIf the project type is used in functions, the default project type will be pre-selected on the screen
StatusYesComboboxChoose the status of the project type:
+ Active: ACtive
+ Inactive: Inactive
To use the project type, the status must be active
OK-ButtonClick OK to save the project type
CANCEL-ButtonClick CANCEL to cancel

Step 4: Click OK, the system notifies “Create successful”.

Edit Project Type​

Step 1: There are two ways to access the EDIT PROJECT TYPE screen:

Method 1: On the Project type screen, click the ⋮ button corresponding to the project type you want to edit and select Edit.

alt text

Method 2: Click on the row of data for the project type you want to edit.

alt text

The system displays the Edit Project Type screen.

alt text

Step 2: Enter the information to be edited similarly to the form Create Project Type, but the code cannot be edited.

Step 3: Click OK, the system notifies “Update successful”.

Delete Project Type​

Step 1: On the Project type screen, click the ⋮ button next to the project type you want to delete, then click Delete.

alt text

The system displays a confirmation popup for deletion.

alt text

Step 2: Confirm deletion by clicking Delete, the system notifies “Delete successful”.

Note: If the project type has element templates and has been used, the system will display an error message indicating that it cannot be deleted.

alt text

Delete All Value​

Delete all element templates of the project type.

Step 1: On the Project type screen, click the “⋮” button next to the project type you want to delete, then select “Delete all value”.

alt text

The system displays a confirmation popup for deletion.

alt text

Step 2: Click Delete, the system notifies “Delete successful”.

Import​

The system supports importing a JSON file containing project type information that has been previously exported. Upon successful import, the system updates the project type in the list.

alt text

Export​

The system supports exporting project type information to an Excel file for reporting purposes or to create a new set of project types for a new project.

alt text

Element Template​

Element Template is a feature that helps users automatically find the XPath of elements on the application interface without manually entering it during the test script configuration process.

Create New Element Template​

Step 1: On the Project type screen, click the ⋮ button next to the project type you want to add/edit an element, then click Element Template.

alt text

The system displays the Element Template screen for the Project type.

alt text

Description of the information fields:

Tab Element Template : Manage a set of Element Templates in the Project Type.

Field NameDescription
alt textClick the button to create a new Element Template
CODECode of the Element Template
NAMEName of the Element Template
DESCRIPTIONDescription of the Element Template
PLATFORMPlatform used for the Element

Step 2: Trên màn hình Element Template, click NEW ELEMENT TEMPLATE để thêm mới.

alt text

Step 3: Enter the necessary information, including:

Field NameMandatoryFormatConstraintsDescription
Project typeYesComboboxDisplays a list of project types in the systemDefault is the project type that the user selects to find the element
PlatformYesComboboxPlatform that the template defines the element:
+ Web
+ Android
+ IOS
+ JavaSwing
+ Windows
+ Api
+ JDBC
+ Web
Only one value can be selected
CodeYesTextMust be unique, cannot be edited, cannot contain special characters except for “_”Identifier code distinguishing different elements
NameYesTextEnter the name of the Element
It is advisable to name it according to the type of element
Description-TextareaEnter a description for the element
StatusYesComboboxChoose the status of the Element Template:
+ Active: Active
+ Inactive: Inactive
To use the Element Template, the status must be active
Config-Configuration for finding XPath
OK-ButtonClick OK to save the Element Template
CANCEL-ButtonClick CANCEL to cancel

Step 4: Config

Configuring the Element Template includes four parts:

  • Element path list: Information about the XPath of the element on the interface.
  • Result xpath list: Information for configuring the XPath formula of the elements that will be found.
  • Result attribute list: Information for configuring the attributes that will be displayed when the element is found.
  • Test element attribute list: Information for configuring the attributes used to name the element when scanning with Smart Locator.

alt text

  • Element path list: A list of XPath elements on the interface.

alt text

  1. Click Add to add an XPath.

  2. On each XPath line, click Edit to update the value of the XPath element:

alt text

Enter values for the information fields:

Field NameMandatoryFormatConstraintsDescription
From-TextUser enters the name of an element that has been previously identified to find the element
NameYesTextUser names the element
+ Note: It is advisable to name it according to the type/format of the element for convenience during use.
XpathYesTextXPath of the element on the interface
CLOSE-ButtonClick CLOSE to save the configuration data
  1. Click Close:

alt text

  • Result xpath list : The attributes configured to retrieve the XPath.

alt text

An attribute is configured based on three parts:

  • Line (1) (2): Result XPath list is the information name of a formula used to retrieve the XPath.
  • Line (3) (4): XPath list is the information about the base XPath of the element, the part that will not change in the XPath formula.
  • Line (5) (6): Information about the attributes contained in the base XPath element used to find the XPath, this information will change according to each element.
  1. Click Add in the lines until enough lines are displayed to configure appropriately to be able to search for the element, for example, using all 6 lines as illustrated.

  2. Click Edit on line 2 to name the XPath retrieval formula, then click Close.

alt text

Note: It is advisable to name it according to the attribute used to retrieve the XPath. It is usually named according to the structure “by_” + the attribute used to find the XPath.

  1. Click Edit on line 4 to enter the base XPath of the element, usually matching the base XPath of the element path list, then click Close.

    You can use components to support querying the relationship between elements to determine the base XPath.

alt text

  1. Click Edit on line 6 to enter the attribute information of the XPath.

alt text

In this:

  • Name: The name of the XPath parameter is set according to the property query rules of one node in XPath.
  • Type: Search condition through the attribute
    • Value: Use the exact value of the attribute.
    • Contains: Use the approximate value (contains) of the attribute.
      • Contains is often used in cases of comparison with the text of the XPath (name = text()).
  • Element: The name of the element the user has set when searching for the XPath in the Element path list.
  • Attribute: The name of the attribute you want to retrieve the value.
  1. Click Close, the configuration information is displayed in the list.

alt text

Note:

  • To retrieve the XPath of the element by multiple different attributes, click Add on line 1 to add another XPath template.
  • To configure multiple attributes in the same XPath result, click Add on line 5, and continue to configure the attribute similarly. For example: the XPath of the Input element is retrieved simultaneously by id and type.

alt text

  • Result attribute list: A list of configured values of the attributes that will be displayed when the element is found.

alt text

  1. Click Add to add a result attribute.
  2. On each XPath line, click Edit to update the value of the result attribute:

alt text

Enter values for the information fields:

Field NameMandatoryFormatConstraintsDescription
NameYesTextName of the attribute for the result - This information will be displayed when scanning with Smart Locator
ElementYesTextThe name of the element the user has set when searching for the XPath in the Element path list
AttributeYesTextThe name of the attribute to retrieve the value
CLOSE-ButtonClick CLOSE to save the configuration data
  1. Click Close:

alt text

Note: To display additional XPath results by other attributes, click Add and enter similarly. It is advisable to configure the Position attribute to view the position of the element during the test script configuration process.

For example:

alt text

To delete an attribute line, click Delete on the corresponding line.

  • Test Element attribute list: A list to configure the formula for automatically naming the element based on the attribute value when the user uses the smart locator.

    alt text

    1. Click Add to add an attribute used to name the element when scanning with the smart locator.
    2. Click Edit to define the attribute used to name the element.

alt text

Enter values for the information fields:

Field NameMandatoryFormatConstraintsDescription
ElementYesTextThe name of the element the user has set when searching for the XPath in the Element path list
AttributeYesTextThe name of the attribute to retrieve the value
CLOSE-ButtonClick CLOSE to save the configuration data

Example: The name of the element is configured to concatenate the values of name and class.

alt text

Note: To delete an attribute line, click Delete on the corresponding line.

Step 5: Click OK, the system notifies “Create successful”.

Duplicate​

Supports creating a new Element Template, used when the Element Template to be created has similar characteristics to an existing template in the system.

Step 1: On the Element Template screen, click button alt text corresponding to the template you want to duplicate, then click Duplicate.

alt text

Step 2: On the Duplicate Element Template screen, edit the necessary information.

alt text

The information is similar to the Add New screen, except for:

Field NameMandatoryFormatConstraintsDescription
CodeYesTextChange the code = “copy_of_” + code of the duplicated element template. The user can edit it.
NameYesTextChange the name = “copy_of_” + name of the duplicated element template. The user can edit it.

Step 3: Click “OK”, the system notifies “Duplicate successful”

Edit Element Template​

Step 1: On the Element Template screen, click button alt text corresponding to the template you want to edit, then select Edit.

alt text

The system displays the Edit Element Template screen.

alt text

Step 2: Enter the information to be edited similarly to the Create Element Template screen, but the code cannot be edited.

Step 3: Click OK, the system notifies “Update successful”.

Element Tag​

Element Tag is a feature that helps users tag groups of element templates that share the same base XPath. When using the Smart Locator scanning function, the system will check the XPath of the Element Tag first before checking the XPath of the element template. This helps reduce the scanning time of element templates when configuring test scenarios.

Create New Element Tag​

Step 1: On the Project type screen, click the “⋮” button next to the project type you want to add/edit an element, then select Element Template.

alt text

The system displays the Element Template screen for the Project type, where users select the Element Tag Tab.

alt text

Description of the information fields:

Field NameDescription
Tab Element TagManage Element Tags that help mark groups of Element Templates with the same element tag.
alt textClick the button to create a new Element Tag template
CODECode of the Element Tag
NAMEName of the Element Tag
DESCRIPTIONDescription of the Element Tag
PLATFORMPlatform used for the Element Tag

Step 2: On the Element Tag screen, click NEW ELEMENT TEMPLATE to add a new one.

alt text

Step 3: Enter the necessary information, including:

Field NameMandatoryFormatConstraintsDescription
Project typeYesComboboxDisplays a list of project types in the systemDefault is the project type that the user selects to find the element
PlatformYesComboboxPlatform that the template defines the element:
+ Web
+ Android
+ IOS
+ JavaSwing
+ Windows
+ Api
+ JDBC
+ Web
Only one value can be selected
CodeYesTextMust be unique, cannot be edited, cannot contain special characters except for “_”Identifier code distinguishing different element tags
NameYesTextEnter the name of the Element Tag
It is advisable to name it according to the type of element Tag
XpathYesTextXPath of the common element tag
Description-TextareaEnter a description for the element tag
StatusYesComboboxChoose the status of the Element Tag:
+ Active: Active
+ Inactive: Inactive
To use the Element Tag, the status must be active
OK-ButtonClick OK to save the Element Tag
CANCEL-ButtonClick CANCEL to cancel

Step 4: Click OK, the system notifies “Create successful”.

Edit Element Tag​

Step 1: On the Element Tag screen, click the button alt text corresponding to the tag you want to edit, then select Edit.

alt text

Step 2: The system displays the Edit Element Tag screen.

alt text

The EDIT ELEMENT TAG screen includes the same information fields as the CREATE ELEMENT TAG screen, in addition to special fields that are only displayed when EDITING ELEMENT TAG:

Field NameMandatoryFormatConstraintsDescription
Element Tag TemplateYesLabelDisplays the number of element templates contained in the element tag
alt text-ButtonClick the button to add a new template element to the element tag
Name-TextName of the element in the element tag
Element TemplateYesTextCode of the Element Template
Element TagYesTextCode of the element tag assigned to the Element Template

Step 3: Click OK, the system notifies “Update successful”.

Add New ELEMENT TAG TEMPLATE​

Step 1: On the EDIT ELEMENT TAG screen, click the button NEW ELEMENT TAG TEMPLATE.

Step 2: The system displays the CREATE ELEMENT TAG TEMPLATE.

alt text

Users enter the necessary information:

Field NameMandatoryFormatConstraintsDescription
Project typeYesComboboxDisplays the project type containing the element tag. Cannot be edited
Element tagYesComboboxDisplays the code of the element tag. Cannot be edited
Element templateYesComboboxOnly displays a list of element templates that share the same platform as the element tag. Only element templates that do not already exist in the element tag being created can be selectedDisplays a list of element templates defined in the element template tab. The user is allowed to select one value
Element NameYesTextEnter the name of the Element Template used in the element tag. It is advisable to name it according to the type and function of the element
OK-ButtonClick OK to save the Element Template
CANCEL-ButtonClick CANCEL to cancel

Step 3: Click OK, the system notifies “Update successful”.

Edit ELEMENT TAG TEMPLATE​

Step 1: There are two ways to edit the element tag template:

Method 1: On the EDIT ELEMENT TAG, click button alt text on the line of the element tag template you want to edit and select Edit.

alt text

Method 2: Click on the line of the element tag template you want to edit.

alt text

Step 2: The system displays the EDIT ELEMENT TAG TEMPLATE.

alt text

  • The information fields and buttons are similar to those on the CREATE ELEMENT TAG TEMPLATE.
  • In the Edit element tag template only the Element template, field can be edited; other information cannot be modified.

Step 3: Click OK, the system notifies “Update successful”.

Delete ELEMENT TAG TEMPLATE​

Step 1: On the EDIT ELEMENT TAG, click button alt text on the line of the element tag template you want to delete and select Delete.

alt text

  • The system displays a confirmation popup for deletion.

alt text

Step 2: Confirm deletion by clicking Delete, the system notifies “Delete successful”.

Delete Element Tag​

Step 1: On the Element tag screen, click the button alt text corresponding to the tag you want to delete and select Delete.

alt text

  • The system displays a confirmation popup for deletion.

alt text

Step 2: Confirm deletion by clicking Delete, the system notifies “Delete successful”.