Data tables
In Sage X3, you can find different types of data tables:
- Predefined data table: These data tables have a fixed number of lines. the lines are predefined and already contain data. You cannot add new lines or delete existing lines. However, it is possible to complete the lines by adding or modifying the existing values when the cell can be edited.
- Dynamic data table: These data tables allow you to create new lines. Where permitted, it is possible to delete a line.
In certain cases, the data tables are split into two sections by a vertical line. the left section is the fixed part of the data table, and the right section is the editable part of the data table. It is also possible to scroll to the right part of the data table.
In addition, the data table can be used in normal pages or in a modal dialog.
the step definitions differ according to the context, the type of data table, or which part of the data table the automation test needs to interact with.
Predefined data table
The following step definitions are available to interact with a predefined data table:
the user selects the main data table of the page
the user selects the data table with X3 field name: "(.*)"
the user selects the data table of section "(.*)"
the user selects row that has the text "(.*)" in column with header: "(.*)"
the user selects row that has the text "(.*)" in column with X3 field name: "(.*)"
the user selects cell with header: "(.*)" of selected row
the user selects cell with X3 field name: "(.*)" of selected row
Examples
Extract from sample 0304A-PredefinedDataTableManagement.
The following diagram illustrates one possible process:
First possibility: selecting the main data table of the page:
#Data table: select the main data table of the page
Given the user selects the main data table of the page
Second possibility: selecting the data table of the section selected:
#Data table: select the data table of the chosen section
Given the user selects the data table of section: "Ledgers"
Third possibility: selecting the data table by the X3 field name :
#Data table: select the data table with X3 field name
Given the user selects the data table with X3 field name: "GCM1_ARRAY_NBRLED"
To find the X3 data field name for a data table, see the section on Writing automated tests under Methodology and recommendations in the Sage X3 Automated Test Platform - User guide.
The following step definitions are available to enter the required values:
Using the field description
#Data table: row selection with column header name.
When the user selects row that has the text "Legal" in column with header: "General ledger type"
#Data table: select a value in the selected drop-down list of the selected row
Then the user selects cell with header: "Auto general ledger" of selected row
And the user selects the choice "No" of the selected cell
#Data table: enter a value in the selected text cell of the selected row and hits tab key.
Then the user selects cell with header: "Ledger" of selected row
And the user adds the text "NAS" in selected cell
Then the user selects cell with header: "Currency" of selected row
And the user adds the text "USD" in selected cell and hits tab key
Using the x3name value
#Data table: select a value in the selected drop down list of the selected row using the X3 field name (ScreenCode_FieldName).
Then the user selects cell with X3 field name: "GCM1_CFMAUT" of selected row
And the user selects the choice "No" of the selected cell
#Data table: enter a value in the selected text cell of the selected row using the X3 field name (ScreenCode_FieldName).
Then the user selects cell with X3 field name: "GCM1_LED" of selected row
And the user adds the text "NAS" in selected cell
Then the user selects cell with X3 field name: "GCM1_CUR" of selected row
And the user adds the text "USD" in selected cell
Dynamic data table
The following step definitions are available to interact with a dynamic data table:
the user selects last editable cell with column header: "(.*)"
the user selects last editable cell with X3 field name: "(.*)"
the user adds the text "(.*)" in selected cell
Examples
Extract from sample: 0304B-DynamicDataTableManagement.
The diagram below illustrates another possible process:
The following data table does not have a fixed section; therefore we will use the step definition that does not contain the keyword fixed:
As for the predefined data table, the data table needs to be selected first by using the following step definitions:
First possibility: selecting the main data table of the page:
#Data table: select the main data table of the page
Given the user selects the main data table of the page
Second possibility: selecting the data table of the chosen section:
#Data table: select data table of the chosen section
Given the user selects the data table of section: "Management"
Third possibility: Selecting the data table by the x3name:
#Data table: select data table with x3 field name
Given the user selects the data table with X3 field name: "TPT1_ARRAY_BASTAB"
The following step definitions are available to enter values on the first empty line of the data table:
Using field description:
#Data table: create a new line in the data table using cell column header
#Data table: enter a value in the selected Text cell
When the user selects last editable cell with column header: "Method"
Then the user adds the text "WTR" in selected cell
Using the x3name:
#Data table: create a new line in the data table using cell column header
#Data table: enter a value in the selected Text cell with X3 field name (ScreenCode_FieldName)
When the user selects last editable cell with X3 field name: "TPT1_PAM"
Then the user adds the text "WTR" in selected cell
Fixed data table
The following step definitions are available to interact with the fixed part of the data table:
the user selects the main fixed data table of the page
the user selects the fixed data table of section: "(.*)"
the user selects the fixed data table for x3 field name: "(.*)"
the user selects fixed table row number: (.*) in column with X3 field name: "(.*)"
the user selects the fixed cell with X3 field name: "(.*)" and row number: "(.*)"
the user selects last fixed cell with X3 field name: "(.*)"
the user selects last fixed cell with header: "(.*)"
the user selects fixed cell with X3 field name: "(.*)" of selected row
Examples
Extract from sample: 0304C-FixedDataTableManagement.
The following diagram illustrates one possible process when interacting with the fixed part of a dynamic data table:
The left part of the grid is the fixed part of the data table. In the following example, the Site and Ctrl. fields are defined in the fixed part of the data table. It is necessary to first select the fixed part of the data table to interact with these fields, and then to select the fixed cell. If the test continues to interact with the editable part of the data table, it won’t be necessary to select the non-fixed part of the data table. The editable cell will have to be selected by the test.
First possibility: selecting the main fixed data table of the page, as well as the fixed cell:
#Data table: select the fixed part of the main data table of the page
Given the user selects the main fixed data table of the page
Second possibility: selecting the fixed part of the data table selected section, and then selecting the fixed cell:
#Data table: select the fixed part of the data table chosen section
Given the user selects the fixed data table of section: "Lines"
Third possibility: selecting the fixed part of the data table by X3 field name:
#Data table: select the fixed part of the data table selected with X3 field name
Given the user selects the fixed data table for X3 field name: "WMAC2STDCO_ARRAY_NBLIG"
Then the test continues to interact with the fixed cell in the fixed part of the grid:
Using field description
#Data table: enter value in the last fixed cell selected
When the user selects last fixed cell with header: "Site"
Then the user adds the text "ATP21" in selected cell
Using x3name
#Data table: enter value in the last fixed cell selected with X3 field name (ScreenCode_FieldName)
When the user selects last fixed cell with X3 field name: "WMAC2STDCO_FCYLIN"
Then the user adds the text "ATP21" in selected cell
Then the test continues to interact with the editable cell in the right part of the grid:
Using field description
#Data table: enter value in the last editable cell selected
When the user selects last editable cell with column header: "Leg./Ana USA"
Then the user adds the text "20100" in selected cell
Using x3name
#Data table: enter value in the last editable cell selected with X3 field name (ScreenCode_FieldName)
When the user selects last editable cell with X3 field name: "WMAC2STDCO_ACC1"
Then the user adds the text "20100" in selected cell and hits enter key
Data table in Syracuse pages
The following step definition is available to interact with a data table in Syracuse pages:
the user clicks on the link in the cell that has the text "(.*)" in cell with header: "(.*)"
Examples
Extract from sample: 0304D-SyracuseDataTableManagement
#Data table: select a specific row and click on the Toolbox action "Detail"
When the user selects the main data table of the page
#Data table: click on the link cell to display the user information
Then the user clicks on the link in the cell that has the text "ADMCA" in cell with header: "Login"
Data table in popup
The following step definitions are available to interact with a data table in a popup:
the user selects the data table in the popup
the user selects the fixed data table in the popup
Examples
Extract from sample: 0304E-DataTableInPopupManagement.
#Data table: fixed data table interaction in a popup
Given the user selects the fixed data table in the popup
When the user selects first row of the selected data table
And the user selects cell with header "Level" of selected row
Then the selected cell is not empty
Data table and row
The following step definitions are available to interact with a data table and data row:
the user selects row by multiple criteria that has the text "(.*)" in column with header "(.*)" and the text "(.*)" in column with header: "(.*)"
the user selects row that has the text "(.*)" in column with index "(.*)"
the user selects last row of the selected data table
the user selects first row of the selected data table
the user checks if there is value: "(.*)" in the selected row
the user selects row by multiple criteria that has the text "(.*)" in column with X3 field name "(.*)" and the text "(.*)" in column with X3 field name: "(.*)"
the user selects editable row that has the text "(.*)" in column with header: "(.*)"
the user selects editable row that has the text "(.*)" in column with X3 field name: "(.*)"
the user edits text to "(.*)" for cell with X3 field name: "(.*)" of selected row.
the user edits text to "(.*)" for cell with X3 field name: "(.*)" of selected row and hits enter
the user edits text to "(.*)" for cell with header: "(.*)" of selected row
the user clicks on the selected row
the user sets rows to display to (.*)
the number of rows returned in the selected data table is "(.*)"
Examples
Extract from sample: 0304F-DataTableandRowManagement.
#Data table: select the data table of the required section
Given the user selects the data table of section: "Miscellaneous accounts"
#Data table: verify the number of rows returned in the data table
Then the number of rows returned in the selected data table is "18 Results"
Extract from sample: 0304F-DataTableandRowManagement.
#Data table: select data table of the required section
Given the user selects the data table of section: "Miscellaneous accounts"
#Data table: select first row
When the user selects first row of the selected data table
#Data table: check a value exist in the selected row
Then the user checks if there is value "99999" in the selected row
Then the user clicks on the selected row
#Data table: select last row
When the user selects last row of the selected data table
Then the user clicks on the selected row
#Data table: select row by multiple criteria
When the user selects row by multiple criteria that has the text "Debit balance decrease" in column with header: "Miscellaneous accounts" and the text "81500" in column with header: "Account"
Then the user clicks on the selected row
#Data table: select row by multiple criteria and by X3 field name (ScreenCode_FieldName)
When the user selects row by multiple criteria that has the text "Credit balance decrease" in column with X3 field name: "COA2_ACCDES" and the text "81500" in column with X3 field name "COA2_ACCMIS"
Then the user clicks on the selected row
#Data table: select row using column index
When the user selects row that has the text "Exchange loss" in column with index: "CA2"
When the user clicks on the selected row
Extract from sample: 0304F-DataTableandRowManagement.
#Data table: select data table of the required section
Given the user selects the data table of section: "Reciprocal accounts"
#Data table: select editable row and write value
When the user selects editable row that has the text "NA011" in column with header: "Site 1"
Then the user edits text to "NA013" for cell with header: "Site 2" of selected row
#Data table: select editable row by X3 field name (ScreenCode_FieldName) and write value
When the user selects editable row that has the text "NA011" in column with X3 field name: "COA3_FCY1"
Then the user edits text to "NA012" for cell with X3 field name: "COA3_FCY2" of selected row
#Data table: select editable row by X3 field name (ScreenCode_FieldName) and write value and hits enter
When the user selects editable row that has the text "NA011" in column with X3 field name: "COA3_FCY1"
Then the user edits text to "NA013" for cell with X3 field name: "COA3_FCY2" of selected row and hits enter
Data table and cell
The following step definitions are available to interact with a data table and data cell:
the user adds the text "(.*)" in selected cell
the user adds the text "(.*)" in selected cell and hits tab key
the user adds the text "(.*)" in selected cell and hits enter key
the user selects cell with column header: "(.*)" and row number: "(.*)"
the user selects the "(.*)" operator in the search cell
the user selects the disabled cell with column header: "(.*)" and row number: "(.*)"
the user selects last cell with column header: "(.*)"
the user selects cell with text: "(.*)" and column header: "(.*)"
the user selects cell that matches exact with the text: "(.*)" and column header: "(.*)"
the user selects cell that matches exact with the text: "(.*)" and X3 field name: "(.*)"
the value of the selected cell is "(.*)"
the value of the selected cell not is"(.*)"
the selected cell is empty
the selected cell is not empty
Examples
Extract from sample: 0304G-DataTableandCellManagement.
If you need to work with stored values, that uses memory. Please use the following sample: 0304P-DataTableandStoredValueManagement
#Data table: select the data table of field
Given the user selects the data table of field: "Endpoints login"
When the user clicks the "Append" button in the left top bar of the selected data table
#Data table: enter hard coded value in the selected cell
Then the user selects last editable cell with column header: "User login"
And the user adds the text "ADMCA" in selected cell
#Data table: enter value defined in parameter loginUserName in the selected cell
Then the user selects last editable cell with column header: "User login"
And the user adds the text "param:loginUserName" in selected cell
#Data table: enter hardcoded value in the selected cell and hit tab key
Then the user selects last editable cell with column header: "User login"
And the user adds the text "ADMCA" in selected cell and hits tab key
#Data table: enter value defined in parameter loginUserName in the selected cell and hit tab key
Then the user selects last editable cell with column header: "User login"
And the user adds the text "param:loginUserName" in selected cell and hits tab key
#Data table: enter hardcoded value in the selected cell and hit enter key
Then the user selects last editable cell with column header: "User login"
And the user adds the text "ADMCA" in selected cell and hits enter key
#Data table: enter value defined in parameter loginUserName in the selected cell and hit enter key
Then the user selects last editable cell with column header: "User login"
And the user adds the text "param:loginUserName" in selected cell and hits enter key
Extract from sample: 0304G-DataTableandCellManagement.
#Data table: select data table of the required section
Given the user selects the data table of section: "Variance accounts"
#Data table: select cell with row number and verifying value
When the user selects cell with column header: "Variance accounts" and row number: 2
Then the value of the selected cell is "Debit balance increase"
#Data table: select last cell and verifying value
When the user selects last cell with column header: "Description"
Then the value of the selected cell is ""
#Data table: select cell with required value
When the user selects cell with text "Credit balance increase" and column header: "Variance accounts"
Then the value of the selected cell is "Credit balance increase"
#Data table: select cell that match exact text
When the user selects cell that matches exact with the text: "Exchange gain" and column header: "Variance accounts"
Then the value of the selected cell is "Exchange gain"
#Data table: select cell that match exact text using X3 field name (ScreenCode_FieldName)
When the user selects cell that matches exact with the text: "Credit balance decrease" and X3 field name: "GAC2_CNVACCDES"
Then the value of the selected cell is "Credit balance decrease"
Extract from sample: 0304G-DataTableandCellManagement.
#Data table: select data table of the required section
Given the user selects the data table of section: "Variance accounts"
#Data table: select cell with required value
When the user selects cell with text: "Exchange loss" and column header: "Variance accounts"
#Data table: check the content of the cell matches the required value
Then the value of the selected cell is "Exchange loss"
#Data table: check the select cell is not empty
Then the selected cell is not empty
#Data table: check the select cell is not empty (other possibility)
Then the value of the selected cell not is ""
#Data table: select cell with row number and verifying value
When the user selects cell with column header: "Account" and row number: 2
#Data table: check the select cell is empty
Then the selected cell is empty
Extract from sample 0304G-DataTableandCellManagement
#Data table: Filter table column with contain operator
Then
the user selects the data table in the popup
And
the user selects search cell with header: "Code"
And
the user selects the "Contain" operator in the search cell
And
the user adds the next "NA" in selected cell and hits enter key
Data table and forms
The following step definitions are available to interact with forms in a data table:
the user clicks on the selected cell
the user checks the check box contained in the selected cell
the user unchecks the check box contained in the selected cell
the user selects the choice "(.*)" of the selected cell
the choice selected of the selected cell is "(.*)"
the user clicks on the icon contained in the selected cell
Examples
Extract from sample: 0304H-DataTableandFormsManagement.
#Data table: add value in a text cell / fixed part of the data table
Given the user selects the fixed data table of section: "Lines"
When the user selects last fixed cell with header: "Product"
Then the user adds the text "BMS012" in selected cell
#Data table: add value in a text cell / dynamic part of the data table
Given the user selects last editable cell with column header: "Ordered qty."
Then the user adds the text "4" in selected cell
Extract from sample: 0304H-DataTableandFormsManagement.
#Data table: set the expected value of the selected drop-down list and check the corresponding value selected
When the user selects last editable cell with column header "Allocation type"
Then the user selects the choice "Detailed" of the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Allocation type"
Then the choice selected of the selected cell is "Detailed"
Extract from sample: 0304H-DataTableandFormsManagement
#Data table: select the required row
Given the user selects the data table of section: "Company selection"
Then the user sets rows to display to 50
When the user selects row that has the text "ATP2" in column with header: "Company"
#Data table: select and ticked the checkbox and verification the checkbox is ticked
Then the user selects cell with header: "" of selected row
And the user ticks the checkbox contained in the selected cell
And the value of the checkbox contained in the selected cell is ticked
#Data table: unticked the check box and verification the check box is not ticked
And the user unticks the checkbox contained in the selected cell
And the value of the checkbox contained in the selected cell is unticked
#Data table: other possibility to check the checkbox but the previous one will be preferred
When the user selects first row of the selected data table
Then the user selects cell with header: "" of selected row
And the user clicks on the selected cell
Extract from sample: 0304H-DataTableandFormsManagement.
#left Panel: open the picking left list and select the required document
Given the user clicks the "Open items" link on the left panel
When the user selects the data table of left panel
#Data table: tick the select all checkbox of the data table
And the user ticks the select all checkbox contained in the column header
#Data table: untick the select all checkbox of the data table
And the user unticks the select all checkbox contained in the column header
Extract from sample: 0304H-DataTableandFormsManagement.
#Data table: select the required data table row
Then the user selects the main fixed data table of the page
And the user selects row that has the text "B" in column with header: "Major version"
#Data table: select the cell of the selected row containing the icon field and click on it
And the user selects cell with header: "Minor versions" of selected row
And the user clicks on the icon contained in the selected cell
Data table and date cell
The following step definitions are available to interact with date fields in a data table:
the user enters today's date in the selected cell
the user enters a generated date using the value "(.*)" in the selected cell
the user enters the first day of the month in the selected cell.
the user enters the first day of the month in the selected cell and adjusts by "(.*)"
the user enters the first day of the year in the selected cell
the user enters the first day of the year in the selected cell and adjusts by "(.*)"
the user enters the last day of the month in the selected cell.
the user enters the last day of the month in the selected cell and adjusts by "(.*)"
the user enters the last day of the year in the selected cell.
the user enters the last day of the year in the selected cell and adjusts by "(.*)"
the user enters the day in the selected cell
the user enters the month in the selected cell
the user enters the year in the selected cell
the user enters the week number in the selected cell
the user enters the current tax year starting "(.*)" in the selected cell
the user enters the "(.*)" from today in the selected cell
the value of the selected cell is todays date
the value of the selected cell is a generated date using value "(.*)"
the value of the selected cell is the first day of the month
the value of the selected cell is the first day of the month adjusted by "(.*)"
the value of the selected cell is the first day of the year
the value of the selected cell is the first day of the year adjusted by "(.*)"
the value of the selected cell is the last day of the month.
the value of the selected cell is the last day of the month adjusted by "(.*)"
the value of the selected cell is the last day of the year
the value of the selected cell is the last day of the year adjusted by "(.*)"
the value of the selected cell is the current day
the value of the selected cell is the current month
the value of the selected cell is the current year
the value of the selected cell is the current week number.
the value of the selected cell is the current tax year starting "(.*)"
the value of the selected cell is the "(.*)" from today.
the value of the selected cell is a generated none locale date using value "(.*)".
Examples
Extract from sample: 0304I-DataTableandDateManagement
#Data table: select main table to the page
Given the user selects the main data table of the page
#Date cell: entering & verifying value - Today's date
When the user selects last editable cell with column header: "Start date"
Then the user enters todays date in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is todays date
#Date cell: entering & verifying value - Tomorrow's date
When the user selects last editable cell with column header: "Start date"
Then the user enters a generated date using the value "T+1" in the selected cell
And the user hits tab
When the user selects last editable cell with column header "Start date"
Then the value of the selected cell is a generated date using value "T+1"
#Date cell: entering & verifying value - Yesterday's date
When the user selects last editable cell with column header: "Start date"
Then the user enters a generated date using the value "T-1" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is a generated date using value "T-1"
And the user waits 1 seconds
#Date cell: entering & verifying value - n day after today with n=3
When the user selects last editable cell with column header: "Start date"
Then the user enters a generated date using the value "T+3" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is a generated date using value "T+3"
#Date cell: entering & verifying value - n day before today with n=3
When the user selects last editable cell with column header: "Start date"
Then the user enters a generated date using the value "T-3" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is a generated date using value "T-3"
#Date cell: entering & verifying value - First day of the current month
When the user selects last editable cell with column header: "Start date"
Then the user enters the first day of the month in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the first day of the month
#Date cell: entering & verifying value - Last day of the current month
When the user selects last editable cell with column header: "Start date"
Then the user enters the last day of the month in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the last day of the month
#Date cell: entering & verifying value - n month after today with n=2
When the user selects last editable cell with column header: "Start date"
Then the user enters the first day of the month in the selected cell and adjusts by "M+2"
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the first day of the month adjusted by "M+2"
#Date cell: entering & verifying value - First day of the current year
Whenthe user selects last editable cell with column header: "Start date"
Thenthe user enters the first day of the year in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Thenthe value of the selected cell is the first day of the year
#Date cell: entering & verifying value - Last day of the current year
When the user selects last editable cell with column header: "Start date"
Then the user enters the last day of the year in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the last day of the year
#Date cell: entering & verifying value - n years after today with n=2
When the user selects last editable cell with column header: "Start date"
Then the user enters a generated date using the value "Y+2" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is a generated date using value "Y+2"
#Date cell: entering & verifying value - n years before today with n=2
When the user selects last editable cell with column header: "Start date"
Then the user enters a generated date using the value "Y-2" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is a generated date using value "Y-2"
#Date cell: entering & verifying value - First day of the next month
When the user selects last editable cell with column header "Start date"
Then the user enters the first day of the month in the selected cell and adjusts by "M+1"
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the first day of the month adjusted by "M+1"
#Date cell: entering & verifying value - Last day of the next month
When the user selects last editable cell with column header: "Start date"
Then the user enters the last day of the month in the selected cell and adjusts by "M+1"
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the last day of the month adjusted by "M+1"
#Date cell: entering & verifying value - First day of the next year
When the user selects last editable cell with column header: "Start date"
Then the user enters the first day of the year in the selected cell and adjusts by "Y+1"
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the first day of the year adjusted by "Y+1"
#Date cell: entering & verifying value - Last day of the previous year
When the user selects last editable cell with column header: "Start date"
Then the user enters the last day of the year in the selected cell and adjusts by "Y+1"
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the last day of the year adjusted by "Y+1"
#Date cell: 1st Monday from Today
#Value can be 1st 2nd 3rd 4th, Monday Tuesday, Wednesday until Sunday
When the user selects last editable cell with column header: "Start date"
Then the user enters the "1st Monday" from today in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the "1st Monday" from today
#Date cell: 3rd Tuesday + 4 days from Today
#Value can be 1st 2nd 3rd 4th, Monday Tuesday, Wednesday until Sunday
When the user selects last editable cell with column header: "Start date"
Then the user enters the "3rd Tuesday +4" from today in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is the "3rd Tuesday +4" from today
Extract from sample: 0304I-DataTableandDateManagement.
#Date cell: returning current month & verifying value
When the user selects last editable cell with column header: "Months"
Then the user enters the month in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Months"
Then the value of the selected cell is the current month
#Date cell: returning current year & verifying value
When the user selects last editable cell with column header: "Year"
Then the user enters the year in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Year"
Then the value of the selected cell is the current year
#Date cell: returning current tax year & verifying value
When the user selects last editable cell with column header: "Year"
Then the user enters the current tax year starting "2020" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Year"
Then the value of the selected cell is the current tax year starting "2020"
#Date cell: returning current day & verifying value
When the user selects last editable cell with column header: "Day"
Then the user enters the day in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Day"
Then the value of the selected cell is the current day
#Date cell: returning current week number & verifying value
When the user selects last editable cell with column header "Week"
Then the user enters the week number in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Week"
Then the value of the selected cell is the current week number
Extract from sample: 0304I-DataTableandDateManagement
#Data table: select main table to the page
Given the user selects the main data table of the page
#Date cell: entering & verifying value - Today's date
Given the user selects last editable cell with column header: "Begin"
When the user enters a generated date using the value "T.M.Y" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Begin"
Then the value of the selected cell is a generated date using value "T.M.Y"
#Date cell: entering & verifying value - Last day of current month of next year
Given the user selects last editable cell with column header: "Begin"
When the user enters a generated date using the value "L.M.(Y+1)" in the selected cell
And the user hits tab
When the user selects last editable cell with column header "Begin"
Then the value of the selected cell is a generated date using value "L.M.(Y+1)"
Extract from sample: 0304I-DataTableandDateManagement
#Data table: select main table to the page
Given the user selects the main data table of the page
#Date cell: entering & verifying value - Today's date
Given the user selects last editable cell with column header: "Start date"
When the user enters a generated date using the value "M/T/Y" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Start date"
Then the value of the selected cell is a generated date using value "M/T/Y"
#Date cell: entering & verifying value - Last day of current month of next year
Given the user selects last editable cell with column header: "Start date"
When the user enters a generated date using the value "M/L/(Y+1)" in the selected cell
And the user hits tab
When the user selects last editable cell with column header "Start date"
Then the value of the selected cell is a generated date using value "M/L/(Y+1)"
Extract from sample: 0304I-DataTableandDateManagement
#Data table: select main table to the page
Given the user selects the main data table of the page
#Date cell: entering & verifying value - Today's date
Given the user selects last editable cell with column header: "Date début"
When the user enters a generated date using the value "T/M/Y" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Date début"
Then the value of the selected cell is a generated date using value "T/M/Y"
#Date cell: entering & verifying value - Last day of current month of next year
Given the user selects last editable cell with column header: "Date début"
When the user enters a generated date using the value "L/M/(Y+1)" in the selected cell
And the user hits tab
When the user selects last editable cell with column header "Date début"
Then the value of the selected cell is a generated date using value "L/M/(Y+1)"
Extract from sample: 0304I-DataTableandDateManagement
#Data table: select main table to the page
Given the user selects the main data table of the page
#Date cell: entering & verifying value - Today's date
Given the user selects last editable cell with column header: "Data od"
When the user enters a generated date using the value "(Y)-(M)-(T)" in the selected cell
And the user hits tab
When the user selects last editable cell with column header: "Data od"
Then the value of the selected cell is a generated date using value "(Y)-(M)-(T)"
#Date cell: entering & verifying value - Last day of current month of next year
Given the user selects last editable cell with column header: "Date od"
When the user enters a generated date using the value "(Y+1)-(M)-(L)" in the selected cell
And the user hits tab
When the user selects last editable cell with column header "Data od"
Then the value of the selected cell is a generated date using value "(Y+1)-(M)-(L)"
Extract from sample: 0304I-DataTableandDateManagement
The step definition allows to control a date format different from the current user locale date format for the current language. The step definitions ignores the time information or any information after the date.
#Data table: select a specific row and control the none local date
When the user selects the main data table of the page
And the user selects row that has the text "ACCENTRY01" in column with header: "Name"
And the user selects cell with header: "End date/time GMT" of selected row
Then the value of the selected cell is a generated none local date using value "Y/M/T"
Data table and row action
The following step definitions are available to use a row action in a data table:
the user opens "(.*)" function on toolbox of the selected row
the user highlights the selected row
Examples
Extract from sample: 0304J-DataTableRowActionManagement.
#Data table: insert a line using toolbox action of the selected row
Given the user selects the main fixed data table of the page
When the user selects row that has the text "Discount2" in column with header: "Description"
#Row action: insert a new line
Then the user opens "Insert" function on toolbox of the selected row
#Row action: delete the selected line
Then the user opens "Delete" function on toolbox of the selected row
Extract from sample: 0304J-DataTableRowActionManagement.
#Data table: select the required row in the data table
Given the user selects the fixed data table of section: "List of values"
When the user selects row that has the text "100" in column with header: "Code"
Then the user highlights the selected row
Data table and key command
The following step definitions are available to use a key command in a data table:
the user hits enter key in the selected cell
the user hits tab key in the selected cell
the user hits escape key in the selected cell
Examples
Extract from sample: 0304K-DataTableandKeyCommand.
#Data table: create a new line
Given the user selects the main fixed data table of the page
#Data table: enter a value and hit tab key command
When the user selects last fixed cell with header: "Code"
Then the user adds the text "[email protected]" in selected cell
And the user hits tab key in the selected cell
#Data table: enter a value and hit enter key command
When the user selects last fixed cell with header "Code"
Then the user adds the text "[email protected]" in selected cell
And the user hits enter key in the selected cell
#Data table: enter a value and hit escape key command
When the user selects last fixed cell with header: "Code"
Then the user adds the text "[email protected]" in selected cell
And the user hits escape key in the selected cell
Data table and hierarchical cell
The following step definitions are available to use a hierarchical cell in a data table:
the user selects hierarchical cell of selected row
the user selects hierarchical cell with text "(.*)"
the user expands the hierarchical list of the selected cell
the user collapses the hierarchical list of the selected cell
the user selects row that has the hierarchical cell with text "(.*)"
the user clicks the "(.*)" button in the left top bar of the selected data table
the user clicks the "(.*)" button in the right top bar of the selected data table
Examples
Extract from sample: 0304L-DataTableHierarchicalCellManagement.
#Data table: select the main data table of the page
And the user selects the data table with X3 field name: "PJMTAS0_ARRAY_NBLIG"
The first line of the hierarchical data table contains a document reference (dynamic); it is therefore more appropriate to select the line dynamically using a stored value.
#Hierarchical cell: select the row containing the project reference and check the status of the current line
Given the user selects row that has the hierarchical cell with text: "ATP212109000072 [ ATP21 - PJM001 ]"
When the user selects cell with header: "Status" of selected row
Then the value of the selected cell is "New"
#Hierarchical cell: select the required hierarchical cell containing the project reference
Given the user selects hierarchical cell with text: "ATP212109000072 [ ATP21 - PJM001 ]"
#Hierarchical cell: expand the hierarchical cell
When the user expands the hierarchical list of the selected cell
#Hierarchical cell: select the required hierarchical cell
Given the user selects hierarchical cell with text: "T-030 [ Server assembly and test ]"
And the user expands the hierarchical list of the selected cell
And the user clicks on the selected cell
#Hierarchical cell: select the row whose the hierarchical cell has the required value and check the value of a given cell on the same row
Given the user selects row that has the hierarchical cell with text: "T-031 [ Server assembly ]"
And the user selects cell with header "Status" of selected row
And the value of the selected cell is "New"
#Hierarchical cell: collapse the hierarchical cell
Given the user selects hierarchical cell with text :"T-030 [ Server assembly and test ]"
Then the user collapses the hierarchical list of the selected cell
Extract from sample: 0304L-DataTableHierarchicalCellManagement.
#Data table: select the main data table of the page
And the user selects the data table with x3 field name: "PJMTAS0_ARRAY_NBLIG"
#Data table: expand the hierarchical data table
When the user clicks the "Expand all" button in the left top bar of the selected data table
#Data table: collapse the hierarchical data table
When the user clicks the "Collapse all" button in the left top bar of the selected data table
Data table and data selection
The following step definitions are available to use data selection in a data table:
the user clicks on the cell that has the text "(.*)" in cell with header: "(.*)"
the user clicks on the cell that matches exact with the text "(.*)" in cell with header: "(.*)"
Examples
Extract from sample: 0304M-DataTableandDataSelectionManagement.
#Data selection: method 1
Given the user clicks the "Selection" button on the "Unit" text field
When the user selects the data table in the popup
Then the user clicks on the cell that matches exact with the text "Hour" in cell with header: "Description"
#Data selection: method 2
Given the user clicks the "Selection" button on the "Unit" text field
When the user selects the data table in the popup
Then the user clicks on the cell that has the text "Day 4H" in cell with header: "Description"
#Data selection: method 3
Given the user clicks the "Selection" button on the "Unit" text field
When the user selects the data table in the popup
Then the user selects search cell with header: "Unit"
And the user adds the text "J8H" in selected cell and hits enter key
And the user selects cell with column header: "Unit" and row number: 1
And the user clicks on the selected cell
Data table and cell action
The following step definitions are available to use cell action in a data table:
the user clicks the "(.*)" action button of the selected cell
the user clicks the "(.*)" option of the actions panel for the selected cell
Examples
Extract from sample: 0304N-DataTableandCellActionManagement.
#Cell action: use the cell's quick selection to select the product
Given the user selects last fixed cell with header: "Product"
When the user clicks the "Selection" action button of the selected cell
Then the user selects the data table in the popup
And the user selects search cell with header: "Product"
And the user adds the text "BMS001" in selected cell and hits enter key
And the user selects cell with column header: "Product" and row number: 1
And the user clicks on the selected cell
Extract from sample: 0304N-DataTableandCellActionManagement.
#Data table: select the fixed part of the data table
Then the user selects the fixed data table of section: "Lines"
#Cell action: use the Products option to Jump to the Product function
Given the user selects last fixed cell with header: "Product"
Then the user adds the text "BMS001" in selected cell
When the user clicks the "Products" option of the actions panel for the selected cell
Then the "Product" screen is displayed
Scrolling data table
The following step definitions are available to use a scrolling data table:
the user selects the scrolling data table for X3 field name: "(.*)".
the user selects cell that may not be visible with column header: "(.*)" and row number: "(.*)".
Examples
Extract from sample: 0304O-ScrollingDataTableManagement.
#Data table: Scrolling data table selection by X3 field name
Given the user selects the scrolling data table for x3 field name: "WK4ALL1_ARRAY_NBLIG"
When the user selects cell that may not be visible with column header: "Order no." and row number: 1
Then the value of the selected cell is "SONATP210001"
Data table top bar actions
The following step definitions are available to interact with data table actions:
the user selects the data table of field: "(.*)"
the user clicks the "(.*)" button in the left top bar of the selected data table
the user clicks the "(.*)" button in the right top bar of the selected data table
the user clicks the "(.*)" action in the left top bar of the selected data table
Examples
Extract from sample: 0304P-DataTableTopBarActionManagement.
#Data table: Execute the Excel export action in the left top bar of the selected data table
And the user selects the data table of section: "Details"
When the user clicks the "Excel export" action in the left top bar of the selected data table
Extract from sample: 0304P-DataTableTopBarActionManagement.
#Data table: Select the data table of a field and click the Append button in the left top bar
Given the user selects the data table of field: "Endpoints login"
When the user clicks the "Append" button in the left top bar of the selected data table
#Enter the required data in the data table
And the user selects last editable cell with column header: "Endpoint"
And the user clicks the "Selection" action button of the selected cell
And the user selects the data table in the popup
And the user selects cell that matches exact with the text: "Local development" and column header: "Description"
And the user clicks on the selected cell
Extract from sample: 0304P-DataTableTopBarActionManagement.
#Data table: Select the main data table
And the user selects the main data table of the page
#Data table: Go to the next page
When the user clicks the "Next" button in the right top bar of the selected data table
#Data table: Go to the previous page
When the user clicks the "Previous" button in the right top bar of the selected data table
#Data table: Go to the last page
When the user clicks the "Last" button in the right top bar of the selected data table
#Data table: Go to the first page
When the user clicks the "First" button in the right top bar of the selected data table
#Data table: Go to page 3
When the user clicks the "3" button in the right top bar of the selected data table
#Data table: Refresh the data table
When the user clicks the "Refresh" button in the right top bar of the selected data table
#Data table: Maximize the data table
When the user clicks the "Maximize" button in the right top bar of the selected data table
#Data table: Minimize the data table
When the user clicks the "Minimize" button in the right top bar of the selected data table
Extract from sample: 0304P-DataTableTopBarActionManagement.
#Data table: Select the data table
And the user selects the data table of section: "Details"
#Data table: Go to page 2
When the user clicks the "2" button in the right top bar of the selected data table
#Data table: Go to page 1
When the user clicks the "1" button in the right top bar of the selected data table
#Data table: Maximize the data table
When the user clicks the "Maximize" button in the right top bar of the selected data table
#Data table: Minimize the data table
When the user clicks the "Minimize" button in the right top bar of the selected data table
Data table text and background colors of a cell
Available step definitions
The following step definitions are available to verify the text or background color of a cell:
the color of the text in the selected cell is "(.*)"
the color of the background in the selected cell is "(.*)"
Relation between color name and hexadecimal value
Cell text and background color verification is possible using either the color name or the hexadecimal value.
If the cell is using a hexadecimal value that is not defined in the following grid, the color name cannot be used. However, the text or background color verification remains possible, using the hexadecimal value.
Color name | Hexadecimal value |
Red | #FF0000 |
Blue | #0000FF, #78A7F5, #BDDCEC, #AED8E8, #B7DBFF |
Green | #B0EA95, #008000, #80FF80, #008040, #C8FA85, #C7E39B, B0FFB0, #B9FFB9, #C5F5C5, #B7F7B7, #ECFBF0, #C5F7C1, #D7E8B3, #EFF5E2, #00c605 |
Yellow | #FFFFB0, #FEFB81, #FFE080 |
Orange | #FF8240, #FF8040, #ffe7a8, #FFD5C6, #e3a180 |
Black | #000000 |
White | #FFFFFF |
Grey | #E0E0E0, #333333 |
Cyan | #D3FEFC, #77BBBB, #A7D8CD, #008080, #80FFFF |
Pink | #FFB0B0, #FFE1E1, #FFCCCC |
Examples
Extract from the 0304Q-DataTableCellColorManagement sample.
#Control the text color of the cell is red
And the user selects row that has the text "AWARN" in column with header: "Code"
And the user selects cell with header: "Description" of selected row
And the color of the text in the selected cell is "Red"
And the color of the text in the selected cell is "red"
And the color of the text in the selected cell is "#FF0000"
And the color of the text in the selected cell is "#ff0000"
Extract from the 0304Q-DataTableCellColorManagement sample.
#Control the background color of the cell is blue
And the user selects row that has the text "CPYFLD" in column with header: "Code"
And the user selects cell with header: "Description" of selected row
And the color of the background in the selected cell is "Blue"
And the color of the background in the selected cell is "#78A7F5"