Stored values
Text field
The following step definitions are available to use (user) stored values with the text field:
the value of the selected text field is stored
the user writes the stored text value to the selected text field and hits tab key
the user stores the value of the selected text field with the key: "(.*)"
the user writes the stored text with key "(.*)" in the selected text field
the user writes the stored text with key "(.*)" in the selected text field and hits tab key
the user writes the stored text with key "(.*)" in the selected text field and hits enter key
the value of the selected text field matches the stored text value
the value of the selected text field matches the stored text with key "(.*)"
the user stores the generated value with length (b([5-9]|1[0-3])b) with the key "(.*)"
Examples
Extract from sample: 0313A-TextFieldAndStoredValues
#Generate two dynamic sequences of 5 digits each and store the values
And the user stores the generated value with length 5 with the key "ENV_SEQ05A"
And the user stores the generated value with length 5 with the key "ENV_SEQ05B"
#Text field: selection of the text field and write a value defined with the following text and stored value
And the user selects the text field with name: "Source document"
And the user writes "ATP-[ENV_SEQ05A]-[ENV_SEQ05B]" to the selected text field
#Text field: selection of the text field and check it contains the exact value defined with the following text and stored value
Given the user selects the text field with name: "Source document"
Then the value of the selected text field is "ATP-[ENV_SEQ05A]-[ENV_SEQ05B]"
#Text field: selection of the text field and check it contains a value defined with the following text and stored value
Given the user selects the text field with name: "Source document"
Then the value of the selected text field contains "ATP-[ENV_SEQ05A]"
#Text field: selection of the text field and check it contains the string pattern defined with the following text and stored value
Given the user selects the text field with name: "Source document"
Then the value of the selected text field has string pattern "[ENV_SEQ05B]"
#Text field: selection of the text field and check it contains the exact value defined with the following text and stored value
Then the value of the "Source document" text field is "ATP-[ENV_SEQ05A]-[ENV_SEQ05B]"
The user stored values contained between square brackets are loaded from a user-stored-values file when the test is executed.
Extract from sample: 0313A-TextFieldAndStoredValues
#Search cell: use the search cell to filter the Document no. using a user stored value
Then the user selects search cell with header: "Document no."
And the user adds the text "[USV_INVOICE_NUMBER_01]" in selected cell and hits enter key
And the user selects cell with column header: "Document no." and row number: 1
And the user clicks on the selected cell
#Check values using user stored values
And the user selects the text field with name: "Document no."
Then the value of the selected text field is "[USV_INVOICE_NUMBER_01]"
And the user selects the text field with X3 field name: "BIS0_BPRNAM"
Then the value of the selected text field is "Kraft [USV_SUPPLIER_NAME_01]"
#Text field: selection of the text field and check it contains a value defined with the following text and / or user stored value
Given the user selects the text field with X3 field name: "BIS0_BPRNAM"
Then the value of the selected text field contains "Kraft [USV_SUPPLIER_NAME_01]"
Then the value of the selected text field contains "[USV_SUPPLIER_NAME_01]"
#Text field: selection of the text field and check it contains the string pattern defined with the following text and user stored value
Given the user selects the text field with X3 field name: "BIS0_BPRNAM"
Then the value of the selected text field has string pattern "[USV_SUPPLIER_NAME_01]"
#Text field: selection of the text field and check it contains the exact value defined with the following text and user stored value
Then the value of the "Document no." text field is "[USV_INVOICE_NUMBER_01]"
Extract from sample: 0313A-TextFieldAndStoredValues
Then the user selects the text field with name: "Document no."
#Save in memory the value of the selected text field
Given the value of the selected text field is stored
#Write the value saved in memory into the selected text field
When the user writes the stored text value to the selected text field and hits tab key
#Verify the value of the selected text field matches the value saved in memory
Then the value of the selected text field matches the stored text value
Extract from sample: 0313A-TextFieldAndStoredValues
Then the user selects the text field with name: "Document no."
#Stored value: store the value of the selected text field
Given the user stores the value of the selected text field with the key: "ENV_InvoiceReference"
#Stored value: write in the selected text field the value previously stored
When the user writes the stored text with key "ENV_InvoiceReference" in the selected text field
#Stored value: verify the value of the selected text field matches the stored value
Then the value of the selected text field matches the stored text with key "ENV_InvoiceReference"
#Stored value: write in the selected text field the stored value and hit tab key
Then the user writes the stored text with key "ENV_InvoiceReference" in the selected text field and hits tab key
#Stored value: write in the selected text field the stored value and hit enter key
Then the user writes the stored text with key "ENV_InvoiceReference" in the selected text field and hits enter key
In this example, a dynamic sequence of five digits is generated and saved into a stored value.
The dynamic sequence is generated using a timestamp to ensure the unicity of the generated sequence.
The length of the dynamic sequence can be defined between 5 and 13 digits.
Extract from sample: 0313A-TextFieldAndStoredValues
#Stored value: generate a dynamic sequence of 5 digits and store the value
And the user stores the generated value with length 5 with the key "ENV_SEQ05"
#Stored value: selection of the text field and write a value defined with the following text and stored value
Given the user selects the text field with name: "Source document"
And the user writes "ATP-[ENV_SEQ05]" to the selected text field
Text area field
The following step definitions are available to use (user) stored values with the text area field:
the user writes "(.)" to the selected text area
the user writes block of text to the selected text area
the value of the selected text area contains
Examples
Extract from sample: 0313B-TextAreaFieldAndStoredValues
#Generate two dynamic sequences of 5 and 6 digits and store the values
And the user stores the generated value with length 5 with the key "ENV_SEQ05"
And the user stores the generated value with length 6 with the key "ENV_SEQ06"
#Text area: selection of the text area field and write a value with the following text and stored value
Given the user selects the text field with X3 field name: "PJMEVEN_COMMEVEN"
And the user writes "Project [ENV_SEQ05] approved for launch for amount of [ENV_SEQ06] USD" to the selected text area
#Text area: selection of the text area field and check it contains a value defined with the following text and stored value
Given the user selects the text field with X3 field name: "PJMEVEN_COMMEVEN"
Then the value of the selected text area contains
"""
Project [ENV_SEQ05] approved for launch for amount of [ENV_SEQ06] USD
"""
#Text area: selection of the text area field and write block of text defined with the following text and stored value
Given the user selects the text field with X3 field name: "PJMEVEN_COMMEVEN"
Then the user writes block of text to the selected text area
"""
Project approved for launch
Project number [ENV_SEQ05]
"""
And the user hits tab
#Text area: selection of the text area field and check it contains a value defined with the following text and stored value
Given the user selects the text field with X3 field name: "PJMEVEN_COMMEVEN"
Then the value of the selected text area contains
"""
Project number [ENV_SEQ05]
"""
Extract from sample: 0313B-TextAreaFieldAndStoredValues
The user stored values contained between square brackets are loaded from a user-stored-values file when the test is executed.
#Text area: selection of the text area field and write a value with the following text and user stored value
Given the user selects the text field with X3 field name: "PJMEVEN_COMMEVEN"
And the user writes "Project [USV_PROJECT_REFERENCE_01] approved for launch for amount of [USV_PROJECT_AMOUNT_01] USD" to the selected text area
#Text area: selection of the text area field and check it contains a value defined with the following text and user stored value
Given the user selects the text field with X3 field name: "PJMEVEN_COMMEVEN"
Then the value of the selected text area contains
"""
Project [USV_PROJECT_REFERENCE_01] approved for launch for amount of [USV_PROJECT_AMOUNT_01] USD
"""
#Text area: selection of the text area field and write block of text defined with the following text and user stored value
Given the user selects the text field with X3 field name: "PJMEVEN_COMMEVEN"
Then the user writes block of text to the selected text area
"""
Project approved for launch
Project [USV_PROJECT_REFERENCE_01]
"""
And the user hits tab
#Text area: selection of the text area field and check it contains a value defined with the following text and user stored value
Given the user selects the text field with X3 field name: "PJMEVEN_COMMEVEN"
Then the value of the selected text area contains
"""
Project [USV_PROJECT_REFERENCE_01]
"""
Text editor field
The following step definitions are available to use stored values with the text editor field:
the user writes block of text to the selected text editor
the value of the selected text editor is
the value of the selected text editor contains
Examples
Extract from sample: 0313C-TextEditorAndStoredValues
#Generate a dynamic sequence of 5 digits and store the value
And the user stores the generated value with length 5 with the key "ENV_SEQ05"
#Text editor: selection of the text editor field and write a value defined with the following text and stored value
Given the user selects the text editor of section: "Header text"
When the user writes block of text to the selected text editor
"""
We would appreciate it if you would send us the corresponding payments of [ENV_SEQ05] USD
"""
#Text editor: selection of the text editor field and check it contains the exact value defined with the following text and stored value
Given the user selects the text editor of section: "Header text"
Then the value of the selected text editor is
"""
We would appreciate it if you would send us the corresponding payments of [ENV_SEQ05] USD
"""
#Text editor: selection of the text editor field and check it contains a value defined with the following text and stored value
Given the user selects the text editor of section: "Header text"
Then the value of the selected text editor contains
"""
the corresponding payments of [ENV_SEQ05]
"""
Extract from sample: 0313C-TextEditorAndStoredValues
The user stored values contained between square brackets are loaded from a user-stored-values file when the test is executed.
#Text editor: selection of the text editor field and write a value defined with the following text and user stored value
Given the user selects the text editor of section: "Header text"
When the user writes block of text to the selected text editor
"""
We would appreciate it if you would send us the corresponding payments of [USV_PAYMENT_AMOUNT_01] USD
"""
#Text editor: selection of the text editor field and check it contains the exact value defined with the following text and user stored value
Given the user selects the text editor of section: "Header text"
Then the value of the selected text editor is
"""
We would appreciate it if you would send us the corresponding payments of [USV_PAYMENT_AMOUNT_01] USD
"""
#Text editor: selection of the text editor field and check it contains a value defined with the following text and user stored value
Given the user selects the text editor of section: "Header text"
Then the value of the selected text editor contains
"""
the corresponding payments of [USV_PAYMENT_AMOUNT_01]
"""
Password field
The following step definitions are available to use (user) stored values with the password field:
the user writes "(.*)" password to the selected password field
the user writes "(.*)" password to the selected password confirmation field
Examples
Extract from sample: 0313D-PasswordFieldAndStoredValues
#Generate a dynamic sequence of 8 digits and save it into a stored value
And the user stores the generated value with length 8 with the key "ENV_DYN_PASSWORD"
#Password fields: Select the password and confirmation field and enter the dynamic password value
Given the user selects the password fields with name: "New password"
And the user writes "[ENV_DYN_PASSWORD]" password to the selected password field
And the user writes "[ENV_DYN_PASSWORD]" password to the selected password confirmation field
And the user hits tab
Extract from sample: 0313D-PasswordFieldAndStoredValues
The user stored values contained between square brackets are loaded from a user-stored-values file when the test is executed.
#Password fields: Select the password and confirmation field and enter the password value contained in the user stored value
Given the user selects the password fields with name: "New password"
And the user writes "[USV_PASSWORD_01]" password to the selected password field
And the user writes "[USV_PASSWORD_01]" password to the selected password confirmation field
And the user hits tab
Dropdown field
The following step definitions are available to use (user) stored values with the dropdown field:
the user clicks on option that matches exactly with the text "(.*)" of the selected dropdown list
the value of the selected dropdown list is "(.*)"
the user clicks on the "(.*)" option of the selected dropdown list
Examples
Extract from sample: 0313E-DropdownFieldAndStoredValues
#Dropdown list field: selection of the dropdown list with exact match and stored value, assigning and verifying the value selected
Given the user selects the dropdown list with name: "Product status"
When the user clicks on option that matches exactly with the text "[ENV_STATUS]" of the selected dropdown list
And the user stores the value of the selected dropdown list field with the key: "ENV_STATUS2"
Then the value of the selected dropdown list is "[ENV_STATUS2]"
Then the value of the selected dropdown list is "Not usable"
Given the user selects the dropdown list with the name: "Product status"
When the user clicks on the "Active" option of the selected dropdown list
Then the value of the selected dropdown list is "Active"
#Dropdown list field: selection of the dropdown list with stored value, assigning and verifying the value selected
Given the user selects the dropdown list with name: "Product status"
When the user clicks on the "[ENV_STATUS]" option of the selected dropdown list
And the user stores the value of the selected dropdown list field with the key: "ENV_STATUS2"
Then the value of the selected dropdown list is "[ENV_STATUS2]"
Then the value of the selected dropdown list is "Not usable"
Data table
Data table
The following step definitions are available to use a (user) stored value in a data table:
the user selects row that has stored text with the key: "(.*)" in column with header: "(.*)"
the user selects editable row that has the stored text with the key: "(.*)" in column with header: "(.*)"
the user selects editable row that has the stored text with the key: "(.*)" in column with X3 field name: "(.*)"
the user selects fixed table row that has the stored value in column with X3 field name: "(.*)"
the user selects cell that matches exact with the stored text with the key: "(.*)" and column header: "(.*)"
the user adds the stored text with key "(.*)" in selected cell
the user adds the stored text with key "(.*)" in selected cell and hits enter key
the user adds the stored text with key "(.*)" in selected cell and hits tab key
the user opens "(.*)" with stored value function on toolbox of the selected row
the user opens "(.*)" function on toolbox of the selected row
the value of the selected cell is stored
the user stores the value of the selected cell with the key: "(.*)"
the value of the selected cell matches the stored text with key: "(.*)"
the value of the selected text field matches the stored cell value
the user adds the text "(.*)" in selected cell
the value of the selected cell is "(.*)"
the value of the selected cell contains "(.*)"
the value of the selected cell has string pattern "(.*)"
the value of the selected cell not is "(.*)"
the user checks if there is value: "(.*)" in the selected row
the user adds the text "(.*)" in selected cell and hits enter key
the user adds the text "(.*)" in selected cell and hits tab key
the "(.*)" function on toolbox of the selected row is displayed
the user opens "(.*)" function on toolbox of the selected row
Examples
Extract from sample: 0313F-DataTableAndStoredValues.
#Left list selection
Given the user selects the data table of left panel
When the user clicks the "Purchase invoices" link on the left panel
Then the user selects search cell with header: "Site"
And the user adds the text "ATP21" in selected cell and hits enter key
And the user selects cell with column header: "Document no." and row number: "1"
And the user clicks on the selected cell
#Save in memory the reference of the invoice defined in the selected cell
Given the value of the selected cell is stored
#Check that the invoice reference stored in the memory corresponds to the reference defined in the Entry number field
When the user selects the text field with name: "Entry number"
Then the value of the selected text field matches the stored cell value
Extract from sample: 0313F-DataTableAndStoredValues.
When the user selects the data table of section: "Lines"
And the user selects cell with column header: "Number" and row number: 1
#Stored value: store the reference value of the document defined in the selected cell
When the user stores the value of the selected cell with the key: "ENV_PTHNUM01"
#Stored value: check that the value of the selected cell corresponds to the stored value
Then the value of the selected cell matches the stored text with key "ENV_PTHNUM01"
#Stored value: select the editable row based on the reference defined in the stored value
Then the user selects editable row that has the stored text with the key: "ENV_PTHNUM01" in the column with header: "Number"
#Stored value: select the editable row based on the reference defined in the stored value and X3 field name (ScreenCode_FieldName)
Then the user selects editable row that has the stored text with the key: "ENV_PTHNUM01" in the column with X3 field name: "WE8ALL3_NUMORI"
#Stored value: select a row based on the reference defined in the stored value
Given the user selects row that has stored text with the key: "ENV_PTHNUM01" in column with header: "Number"
#Stored value: select the cell whose value corresponds exactly to the stored value
Then the user selects cell that matches exact with the stored text with the key: "ENV_PTHNUM01" and column header: "Number"
Extract from sample: 0313F-DataTableAndStoredValues.
#Stored value: store the value of the selected text field
Then the user selects the text field with name: "Number"
And the user stores the value of the selected text field with the key: "ENV_SOHNUM01"
#Stored value: select the row based on the reference defined in the stored value
Given the user selects the fixed data table for x3 field name: "WMCSOSTD_ARRAY_NBLIG"
When the user selects row that has stored text with the key: "ENV_SOHNUM01" in column with header: "WMCSOSTD_SOHNUM"
#Stored value: verify state visibility of the row action
Thenthe "Order [ENV_SOHNUM01]" function on toolbox of the selected row is displayed
#Stored value: open a row action whose document corresponds to the stored value
Then the user opens "Order [ENV_SOHNUM01]" function on toolbox of the selected row
Extract from sample: 0313F-DataTableAndStoredValues.
#Save the value of the selected text field in memory
Then the user selects the text field with name: "Number"
And the value of the selected text field is stored
#Select the fixed row based on the reference defined in memory
Given the user selects the fixed data table for X3 field name: "WMCSOSTD_ARRAY_NBLIG"
When the user selects fixed table row that has the stored value in column with X3 field name: "WMCSOSTD_SOHNUM"
#Open a row action whose document corresponds to the value saved in memory
Then the user opens "Order" with stored value function on toolbox of the selected row
Extract from sample: 0313F-DataTableAndStoredValues.
Then the user selects the text field with name: "Entry number"
And the user stores the value of the selected text field with the key: "ENV_PIHNUM01"
#Left list selection
Given the user clicks the "Purchase invoices" link on the left panel
When the user selects the data table of left panel
Then the user selects search cell with header: "Document no."
#Stored value: add the stored value in the selected cell
Then the user adds the stored text with key: "ENV_PIHNUM01" in selected cell
#Stored value: add the stored value in the selected cell and hit tab key
Then the user adds the stored text with key: "ENV_PIHNUM01" in selected cell and hits tab key
#Stored value: add the stored value in the selected cell and hit enter key
Then the user adds the stored text with key: "ENV_PIHNUM01" in selected cell and hits enter key
Extract from sample: 0313F-DataTableAndStoredValues.
#Stored value: generate a dynamic sequence of 5 digits and store the value
And the user stores the generated value with length 5 with the key "ENV_SEQ05A"
#Stored value: selection the cell and write the value defined with the following text and stored value
Given the user selects last fixed cell with header: "Code"
And the user adds the text "ATP-[ENV_SEQ05A]-YY" in selected cell
And the user hits enter
And the user selects first row of the selected data table
#Stored value: selection of the cell and check it contains the string pattern defined with the following text and stored value
Given the user selects cell with header: "Code" of selected row
Then the value of the selected cell has string pattern "*[ENV_SEQ05A]*"
#Stored value: selection of the cell and check it contains the exact value defined with the following text and stored value
Given the user selects cell with header: "Code" of selected row
Then the value of the selected cell is "ATP-[ENV_SEQ05A]-YY"
#Stored value: selection of the cell and check it contains a value defined with the following text and stored value
Given the user selects cell with header: "Code" of selected row
Then the value of the selected cell contains "ATP-[ENV_SEQ05A]"
#Stored value: selection of the cell and check it doesn't contain the value defined with the following text and stored value
Given the user selects cell with header: "Code" of selected row
Then the value of the selected cell not is "ATX-[ENV_SEQ05A]-YY"
#Stored value: check if the row contains the value defined with the following text and stored value
Then the user checks if there is value: "ATP-[ENV_SEQ05A]-YY" in the selected row
The user stored values contained between square brackets are loaded from a user-stored-values file when the test is executed.
Extract from sample: 0313F-DataTableAndStoredValues.
Given the user selects last cell with column header: "Code description (FRA)"
And the user adds the text "ATP-[USV_CODE_01]-ZZ" in selected cell and hits enter key
And the user selects first row of the selected data table
#Stored value: selection of the cell and check it contains the string pattern defined with the following text and user stored value
Given the user selects cell with header: "Code description (FRA)" of selected row
Then the value of the selected cell has string pattern "*[USV_CODE_01]*"
#Stored value: selection of the cell and check it contains the exact value defined with the following text and user stored value
Given the user selects cell with header: "Code description (FRA)" of selected row
Then the value of the selected cell is "ATP-[USV_CODE_01]-ZZ"
#Stored value: selection of the cell and check it contains a value defined with the following text and user stored value
Given the user selects cell with header: "Code description (FRA)" of selected row
Then the value of the selected cell contains "ATP-[USV_CODE_01]"
#Stored value: selection of the cell and check it doesn't contain the value defined with the following text and user stored value
Given the user selects cell with header: "Code description (FRA)" of selected row
Then the value of the selected cell not is "ATX-[USV_CODE_01]-ZZ"
#Stored value: check if the row contains the value defined with the following text and user stored value
Then the user checks if there is value: "ATP-[USV_CODE_01]-ZZ" in the selected row
Data table and hierarchical cell
The following step definitions are available to use stored values with hierarchical cells:
the user selects row that has the hierarchical cell with the stored text with key: "(.*)"
the user selects hierarchical cell with the stored text with key: "(.*)"
Examples
Extract from sample: 0313G-DataTableandHerachicalCellAndStoredValues.
#Store the project reference in a stored value
And the user selects the text field with name: "Project"
And the user stores the value of the selected text field with the key: "ENV_ATPPJM01"
#Open Task planning action
Then the user clicks the "Task planning" button in the header
#Data table: select the main data table of the page
And the user selects the data table with x3 field name: "PJMTAS0_ARRAY_NBLIG"
#Hierarchical cell: select the row containing the project reference saved in the stored value and check the status of the current line
Given the user selects row that has the hierarchical cell with the stored text with key: "ENV_ATPPJM01"
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 saved in the stored value
Given the user selects hierarchical cell with the stored text with key: "ENV_ATPPJM01"
Left panel
Left list
The following step definitions are available to use (user) stored values with the left list field:
the user adds the text "(.*)" in selected cell
Examples
Extract from sample: 0313H-LeftPanelAndStoredValues.
#Left panel: select the required data using the left list
When the user clicks the "Supplier categories" link on the left panel
Given the user selects the data table of left panel
#Search cell: use the search cell to filter the category using a stored value
Then the user selects search cell with header: "Category"
And the user adds the text "[ENV_BSGCOD1]" in selected cell and hits enter key
And the user selects cell with column header: "Category" and row number: 1
And the user clicks on the selected cell
Extract from sample: 0313H-LeftPanelAndStoredValues.
#Left panel: select the required data using the left list
When the user clicks the "Supplier categories" link on the left panel
Given the user selects the data table of left panel
#Search cell: use the search cell to filter the category using a stored value
Then the user selects search cell with header: "Category"
And the user adds the stored text with key "ENV_BSGCOD2" in selected cell and hits enter key
And the user selects cell with column header: "Category" and row number: "1"
And the user clicks on the selected cell
Picking list
The following step definition is available to use stored values with picking lists:
the user selects the item with the stored text with key "(.*)" and with the text containing "(.*)" of the picking list panel
the user selects the item containing string pattern "(.*)" of the picking list panel
the user selects the item containing string pattern "(.*)" of the picking list panel next level
Examples
Extract from sample: 0313I-PickingListAndStoredValues.
#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
Then the user selects search cell with header: "Number"
And the user adds the text "[ENV_ATPBISNU04]" in selected cell and hits enter key
And the user selects cell with column header: "Number" and row number: 1
And the user clicks on the selected cell
Extract from sample: 0313I-PickingListAndStoredValues.
#Left panel: open the picking list
Given the user clicks the "Order selection" link on the left panel
When the user selects the main picking list panel of the screen
And the user clicks the "Expand all" button in the left top bar of the selected picking list
#pattern selection using stored values
And the user selects the item containing string pattern "[ENV_ATPSOHNUM01]*[ENV_ATPBPCORD01]*" of the picking list panel
And the user expands the selected picking list panel item
#pattern selection using user stored values and hard coded text
And the user selects the item containing string pattern "[USV_ITMREF01]*[USV_ATPQTY01]*UN" of the picking list panel next level
#Picking of the selected item
And the user checks the selected picking list panel item
#Unpicking of the selected item
And the user unchecks the selected picking list panel item
#Left panel: collapse the picking left list
And the user clicks the "Collapse all" button in the left top bar of the selected picking list
Recommendation
The use of the following step definition where information are hardcoded is not recommended, as certain information is dynamic like document reference, date, item reference, the quantity etc. There is a risk that the test can fail if the information changes:
Wrong test definition using hardcoded information.
And the user clicks the "Expand all" button in the left top bar of the selected picking list
And the user selects the item "SONATP210001 07/02/2020 Ship-to Customer NA008 ST003" of the picking list panel
And the user selects the item "BMS012 PCI E 128 Mb graphics adapter Remains to be delivered 4 UN" of the picking list panel next level
Correct test definition using dynamic information with (user) stored values and string pattern.
It is recommended to use string pattern step definition to select the required item in the picking list, using combination of stored values, user stored values or text. The wildcat character allows to bypass the element you don't want to define in the string pattern.
And the user selects the item containing string pattern "[ENV_ATPSOHNUM01]*[ENV_ATPBPCORD01]*" of the picking list panel
And the user selects the item containing string pattern "[USV_ITMREF01]*[USV_ATPQTY01]*UN" of the picking list panel next level
Extract from sample: 0313I-PickingListAndStoredValues.
#Left panel: open the picking list and select the required order defined in the stored value
Given the user clicks the "Order selection" link on the left panel
When the user selects the main picking list panel of the screen
And the user clicks the "Expand all" button in the left top bar of the selected picking list
And the user selects the item with the stored text with key "ENV_ATPSOHNUM01" and with the text containing "NA008" of the picking list panel
And the user expands the selected picking list panel item
And the user selects the item "BMS012 PCI E 128 Mb graphics adapter Remains to be delivered 4 UN" of the picking list panel next level
#Picking of the selected item
And the user checks the selected picking list panel item
#Unpicking of the selected item
And the user unchecks the selected picking list panel item
#Left panel: collapse the picking left list
And the user clicks the "Collapse all" button in the left top bar of the selected picking list
Recommendation
The use of the following step definition where information are hardcoded is not recommended, as certain information is dynamic like document reference, date, item reference, the quantity etc. There is a risk that the test can fail if the information changes
And the user clicks the "Expand all" button in the left top bar of the selected picking list
And the user selects the item "SONATP210001 07/02/2020 Ship-to Customer NA008 ST003" of the picking list panel
The following step definition with stored value, is used to ensure the script will find the item every time the test is executed.
For more flexibility it is recommended to use the previous method: Interact with a hierarchical picking list using (stored) values (string pattern method).
And the user selects the item with the stored text with key "ENV_ATPSOHNUM01" and with the text containing "NA008" of the picking list panel
Modal dialog
The following step definitions are available to use (user) stored values with the Modal dialog field:
the modal dialog "(.*)" is displayed
Examples
Extract from sample: 0313J-ModalDialogAndStoredValues.
#Modal dialog: check the modal dialog using both text and stored value
When the modal dialog "Released product situation Work Order [ENV_MFGNUM01]" is displayed
Alert box
The following step definition allows you to use values stored in memory with alert boxes:
an alert box with the text containing "(.*)" and the stored text value appears
The following step definitions allow you to use (user) stored values with alert boxes:
an alert box with the text "(.*)" appears
an alert box with the text containing "(.*)" appears
Examples
Extract from sample: 0313K-AlertBoxManagementAndStoredValues.
#Duplicate the invoice
Then the user selects the text field with name: "Document no."
#Save the invoice reference in memory
And the value of the selected text field is stored
And the user writes "" to the selected text field and hits enter key
#Alert box: check that the alert box appears with the message containing the reference previously stored in memory
Then an alert box with the text containing "Reference entered on invoice" and the stored text value appears
Extract from sample: 0313K-AlertBoxManagementAndStoredValues.
And the user selects the text field with name: "Document no."
#Alert box: check the exact message in the alert box appear using a stored value
Then an alert box with the text "Reference entered on invoice [ENV_BISNUM]" appears
#Alert box: check the alert box that appears is containing the value contained in the stored value
Then an alert box with the text containing "on invoice [ENV_BISNUM]" appears
Confirmation Dialog
The following step definitions allow you to use (user) stored values with the confirmation dialog:
a confirmation dialog appears with the message "(.*)"
a confirmation dialog appears containing the message "(.*)"
Example
Extract from sample: 0313L-ConfirmationDialogAndStoredValues
When the user clicks the "Save" action button on the header drop down
#Confirmation dialog: check a confirmation dialog appears with the exact message
Then a confirmation dialog appears with the message "[USV_CONFIRMATION_DIALOG] has been saved".
#Confirmation dialog: check a confirmation dialog appears and contains a specific text
Then a confirmation dialog appears with the message "[USV_CONFIRMATION_DIALOG]".
Log panel
The following step definition allows you to use (user) stored values with the log panel:
the user extracts the value from the selected log panel line starting at "(.*)" for "(.*)" characters and stores it in key "(.*)"
The following step definitions allow you to combine both text and multiple stored values:
the selected log panel includes the message "(.*)"
the selected log panel includes the confirmation message "(.*)"
the selected log panel includes the error message "(.*)"
Examples
Extract from sample: 0313M-LogPanelAndStoredValues
#Log panel: check the confirmation message is returned in the log using both text and stored value
Then the selected log panel includes the confirmation message "Validated document: "[ENV_ATPBISNUM02]"
Extract from sample: 0313M-LogPanelAndStoredValues.
#Extract the supplier invoice from the log and save it in a stored value
Given the user selects the main data table of the page
#This step definition will always select the 1st occurrence of the text searched
When the user selects the log panel line containing text "Validated"
#This step definition allows to define the occurrence of the text searched, and to select an occurrence from 1 to 10
When the user selects the log panel line containing text "Validated" occurrence 1
Then the user extracts the value from the selected log panel line starting at 21 for 17 characters and stores it in key "ENV_ATPBISNUM02B"
Landing page
The following step definitions allow you to use (user) stored values with landing pages:
the user selects the "(.*)" user landing page
the user selects the "(.*)" standard landing page
the landing page title changes to "(.*)"
Example
Extract from sample: 0313N-LandingPageAndStoredValues
#Landing page: check the user is on the default landing page
Given the landing page is displayed
#Landing page: open the standard landing page
When the user selects the "A/R [USV_STD_LANDING_PAGE]" standard landing page
#Landing page: check the landing page title changed
Then the page Landing Page title changes to "A/R [USV_STD_LANDING_PAGE]"
Screen
The following step definitions allow you to use (user) stored values with screens:
the "(.*)" screen is displayed
Example
Extract from sample: 0313O-ScreenControlAndStoredValues
#Open function by code
Given the user opens the "GESGAS" function
#Select Journal entry transaction
And the user selects the data table in the popup
And the user selects cell with text: "STDCO Column complete transaction" and column header: ""
And the user clicks on the selected cell
#Screen: control the screen displayed using (user) stored values
Then the "Journal entry [USV_TRANSACTION]" screen is displayed
And the user takes a screenshot
Date field
the user stores the value of the selected date field with the key: "(.*)"
the user writes first day of the month to the selected date field from the "(.*)" date
the user writes first day of the year to the selected date field from the "(.*)" date
the user writes first day of the quarter to the selected date field from the "(.*)" date
the user writes first day of the week to the selected date field from the "(.*)" date
the user writes last day of the month to the selected date field from the "(.*)" date
the user writes last day of the year to the selected date field from the "(.*)" date
the user writes last day of the quarter to the selected date field from the "(.*)" date
the user writes last day of the week to the selected date field from the "(.*)" date
the user writes previous day of the month to the selected date field from the "(.*)" date
the user writes previous day of the year to the selected date field from the "(.*)" date
the user writes previous day of the quarter to the selected date field from the "(.*)" date
the user writes previous day of the week to the selected date field from the "(.*)" date
the user writes next day of the month to the selected date field from the "(.*)" date
the user writes next day of the year to the selected date field from the "(.*)" date
the user writes next day of the quarter to the selected date field from the "(.*)" date
the user writes next day of the week to the selected date field from the "(.*)" date
the value of the selected date field is the first day of the month from the "(.*)" date
the value of the selected date field is the first day of the year from the "(.*)" date
the value of the selected date field is the first day of the quarter from the "(.*)" date
the value of the selected date field is the first day of the week from the "(.*)" date
the value of the selected date field is the last day of the month from the "(.*)" date
the value of the selected date field is the last day of the year from the "(.*)" date
the value of the selected date field is the last day of the quarter from the "(.*)" date
the value of the selected date field is the last day of the week from the "(.*)" date
the value of the selected date field is the previous day of the month from the "(.*)" date
the value of the selected date field is the previous day of the year from the "(.*)" date
the value of the selected date field is the previous day of the quarter from the "(.*)" date
the value of the selected date field is the previous day of the week from the "(.*)" date
the value of the selected date field is the next day of the month from the "(.*)" date
the value of the selected date field is the next day of the year from the "(.*)" date
the value of the selected date field is the next day of the quarter from the "(.*)" date
the value of the selected date field is the next day of the week from the "(.*)" date
Example
Extract from sample: 0313P-DateFieldAndStoredValues
(example limited to month, but can be replicated for year , week, quarter)
#Date field: entering & verifying value - April the 10th of the current year
Given the user selects the date field with name: "Accounting date"
When the user writes a generated date in the selected date field using the value "04/10/Y"
Then the value of the selected date field is a generated date using value "04/10/Y"
And the user stores the value of the selected date field with the key: "ENV_DATE"
And the user takes a screenshot
#Date field: entering & verifying value - First day of the month based on specific date
And the user writes first day of the month to the selected date field from the "ENV_DATE" date
Then the value of the selected date field is the first day of the month from the "ENV_DATE" date
#Date field: entering & verifying value - Last day of the month based on specific date
And the user writes last day of the month to the selected date field from the "ENV_DATE" date
Then the value of the selected date field is the last day of the month from the "ENV_DATE" date
#Date field: entering & verifying value - Previous day of the month based on specific date
And the user writes previous day of the month to the selected date field from the "ENV_DATE" date
Then the value of the selected date field is the previous day of the month from the "ENV_DATE" date
#Date field: entering & verifying value - Next day of the month based on specific date
And the user writes next day of the month to the selected date field from the "ENV_DATE" date
Then the value of the selected date field is the next day of the month from the "ENV_DATE" date