Skip to content

General steps

gamseb edited this page Sep 17, 2021 · 1 revision

First steps

Step Interface
I log on the homepage

Example: I go on the homepage
I log into "INSTANCE_NAME" as "USERNAME" with password "PASSWORD"

Example: I log into "HQ1" as "supply-manager" with password "1234"
I log into "INSTANCE_NAME"

The administrator credentials will be used.

Example: I log into "HQ1"
I log out
Example: I log out

Synchronization

Step Interface
I synchronize "INSTANCE NAME"

Example: I synchronize "HQ1"

ℹ️ : You don’t need to be logged in when you synchronize. It will work anyway.
-

Go to the right interface

Step Interface
I open tab menu "TAB MENU NAME"

Example: I open tab menu "PURCHASES"
I open accordion menu "ACCORDION NAME"

Example: I open accordion menu "Claim"


⚠️ : Don’t try to open an accordion that is already open
I open tab "TAB NAME"

Example: I open tab "Nomenclature"
I click on menu "MENU NAME" and open the window.
Example: I click on menu "Purchase Order Follow-Up" and open the window
⚠️ : You must use this step when a window opens after clicking on the menu (as show here). Otherwise, your next step will be blocked.

If you need to open submenus, separate the menu’s names by a "|"
Example: I click on menu "Theoretical Kit|Theoretical Kit Item" and open the window
I click on menu "MENU NAME"

Example: I click on menu "Financial Accounting|Journals|Journals"

If you need to open submenus, separate the menu’s names by a "|".

Fill fields (outside a tabular format)

Step Interface
I fill "FIELD NAME" with "VALUE"
Example: I fill “Code” with “MY_CODE”

⚠️ : If you want to set a value in a select box you have to use the exact name as used in the interface.
⚠️ : If you want to change the value of a checkbox you have to choose between “yes” and “no” for the value.
I fill:

Example:
Fill a set of fields to the specified values. If the field appear twice, they are filled in the same order.
-
I fill "FIELD NAME" with "VALUE" and open the window
Example: I fill "Supplier" with "HQ1C1" and open the window

We sometimes want to fill a field with a value that appears in several options (for example: if we want to type 'HQ1' that could be translated to 'HQ1', 'HQ1C1' or 'HQ1C1P1'). As a result, UniField opens a new window to let us choose the right option. This step gives us the possibility to open this new window and select the right option)
I fill "FIELD NAME" with table:

Example:
I fill "File to import:" with table:

⚠️ : The first line has to be filled with letters in the right order (from left to right, from ‘A’ to ...).
⚠️ : The dates have to use this format YYYY-MM-DD (for example: 2016-05-01).
⚠️ : We don’t handle boolean values yet. This feature will come a bit later.

Click

Step Interface
I click on "BUTTON"
Example:I click on "New"
I click on "BUTTON" and open the window

Example: I click on "New" and open the window

⚠️ : You must use this step when a window opens after clicking on the menu (as show here). Otherwise, your next step will be blocked.
I click on "BUTTON" and close the window
Example: I click on "Save & Close" and close the window
I click on "BUTTON" until not available
Example: I click on "Update" until not available

This step is used when you have to wait on a process to complete. It’s the case in most of the import processes.
-
I click on "BUTTON" until "CONTENT" in "FIELD" -
... if a window is open

The step described before that is run only if a window has been opened. Otherwise we just skip it.
-
I click on "BUTTON" and close the window if necessary -
I click on "BUTTON" and open the popup

Click on the given button and open the new popup (a new browser window). The new popup will be the active window from now on (meaning: the next step will be applied to this new window).
-
I click "BUTTON" until I see:
Example: I click "Search" until I see:

When a process is asynchronous we have repeat an action until a new row appears in a table. You can do that with this step. It will wait until we reach the timeout set at runtime.
I click "BUTTON" until I don’t see:

-
I toggle on "BUTTON"
Example: I toggle on "STOCKABLE"
I toggle off "BUTTON"
Example: I toggle off "STOCKABLE"
I close the window
I click "BUTTON" in the side panel
Example: I click "Auto POs creation" in the side panel

⚠️ : You don’t have to open the side panel before clicking. We will open it automatically.
I click "BUTTON" in the side panel and open the window
Example: I click "Source lines" in the side panel and open the window

⚠️ : You don’t have to open the side panel before clicking. We will open it automatically.
⚠️ : You must use this step when a window opens after clicking on the side menu (as show here). Otherwise, your next step will be blocked.
I click "BUTTON" in the side panel and open the popup

Click on the given side menu and open the new popup (a new browser window). The new popup will be the active window from now on (meaning: the next step will be applied to this new window).Example:
-

Checks

Step Interface
I should see "CONTENT" in "FIELD"
Example: I should see "MSF OCG_HQ" in "Warehouse"

ℹ️ : If you don’t want to type the whole text (or you don’t know it), you can use a wild card character: “*”.
Example: I should see "OCG" in “Warehouse”
I should see a text status with "TEXT"
Example: I should see a text status with "Purchase order '' is validated."

ℹ️ : If you don't want to type the whole text (or you don’t know it), you can use a wild card character: "
".
I should see in the main table the following data:

Example: I should see in the main table the following data:
I should not see in the main table the following data:

Example: I should not see in the main table the following data:
I should see a popup with "TEXT"
Example: I should see a popup with "Analytic allocation is mandatory for this line: ".

⚠️ : If you don’t want to type the whole text, you can use a wild card character: "
".
I should see a window with "TEXT"
Example: I should see a window with "Line 2, Entry already imported: Entry *".

⚠️ : If you don’t want to type the whole text, you can use a wild card character: "*".
I shouldn't be able to click "FIELDNAME"

Ensure that a button is not available or disabled.
-
I shouldn't be able to click "TOOLTIP" on line:

Ensure that we cannot click on a tooltip on a specific line. We also check that the line exists.
-
I shouldn't be able to edit "TEXTFIELD"

Ensure that a field exists and that we cannot edit it (because it is readonly or disabled)
-
I shouldn't be able to edit column "COLUMN NAME"

Ensure that the row that can be currently edited is readonly for the current column. To pass this step, a line should be editable and the column should be available.
-

File management

Step Interface
I store the downloaded file as "FILENAME" when ...

Example:
-

Tables

Step Interface
I fill "CONTENT" within column "COLUMN"
Example: I fill "MZ190-SUPZZZ" within column "COST CENTER"
I fill "CONTENT" within column "COLUMN " and open the window
Example: I fill “batch” within column “BATCH NUMBER” and open the window

We sometimes want to fill a field with a value that appears in several options (for example a batch name that doesn’t exist). As a result, UniField opens a new window to let us choose the right option. This step gives us the possibility to open this new window and select the right option.
I tick all the lines
Example: I tick all the lines
I validate the line
Example: I validate the line
I click "TOOLTIP" on line:
You can use "checkbox" to tick a checkbox on the line, "radio" to select a radio button or "line" to click on the whole line.

Example: I click “Source Line” on line:

ℹ️ : If you want to select a line, you can use “checkbox” in the tooltip field. You may select several lines at the same time.
ℹ️ : If you want to select a line, you can use “option” in the tooltip field.
I click "TOOLTIP" on line and open the window:

You can use "checkbox", "option" or "line" as explained above.

ℹ️ : Same step as before except that a window is open after clicking on the tooltip.
I click "TOOLTIP" on line and close the window: -

Save values

Step Interface
I store "FIELD" in "VARIABLE"
Example: I store “Order Reference” in "ORDER_REFERENCE"



The value contained in this field can be used later in the scenario using this syntax: {{ORDER_REFERENCE}} in any text field. Here is an example to open this PO:
I click "Edit" on line:
I store column "COLUMN" in "VARIABLE" for line:
Example: I store column “ORDER TYPE” in “ORDER_TYPE” for line:

The value contained in this field can be used later in the scenario using this syntax: {{ORDER_TYPE}} in any text field. The value contained in this variable is “Regular”.

Translation

Step Interface
I open the translation window for "FIELDNAME" -
I set "TEXT" for language "LANGUAGE" and field "TRANSLATION_DESCRIPTION" -
I should see "TEXT" for language "LANGUAGE" and field "TRANSLATION_DESCRIPTION" -

Debug

Step Interface
I sleep

You can use this step to wait for a long period of time. (30,000 seconds)
ℹ️ : It’s useful if you want to check the current state of the interface.
-
I wait

Wait on the user for key press.
-
I wait "XXX" seconds
Example: I wait "10" seconds

Wait on the user for key press.
-
I debug: I drop into pdb, so that you can find out what elements are on the page. -

Benchmarking

Step Interface
I save the time -
I save the time difference in "VARIABLE" -
I store the values for "VARIABLE1 VARIABLE2 ..." in "CSV_FILENAME" -
Clone this wiki locally