Test Commands
This document refers to the Command Editor options and not JavaScript API to call a command. JavaScript API for the test case step can be viewed by clicking the label for the step. API inputs may not be named exactly the same as Command Editor fields. For example, Assignee in the Dialog box corresponds to a user in the API.
There are more than 80 commands to simplify testing and categorized into five categories below:
- BPM: A set of commands for calling server-side components.
- BPM Assertion : A set of commands for asserting server-side components.
- Case: A set of commands for calling server-side components of a case.
- Case Assertion : A set of commands for asserting server-side components of a case.
- BA: A set of commands for calling server-side components of a business application (available on Cloud Pak for Business Automation).
- UI: A set of commands for UI recording and actions.
- UI assertion: A set of commands for asserting UI components.
- Utility: A set of commands for utility methods, e.g., debug, putContext
BPM
This category of commands is for calling server-side components. There are a lot of common input fields. Below are some statements which are common for most of the commands in this category.
Common Parameters
Name | Required | Description |
---|---|---|
Assignee |
Optional | When specified, the command is executed by the specified BAW user. The drop-down lists all BAW user names defined in the BAW Configuration the Test Project is connected to. More details refer to BAW Configuration/Add user to a BAW server. Notes: Currently, all the commands are run as the “default user”, unless manually modified. If manually modified, the following commands are run as the latest modified user until modified again. If your recorded commands come from the “BPM”, “BPM Assertion”, “Case” or “Case Assertion” command category (these commands will invoke BAW REST API or Java API), you need to choose the proper assignee based on business logic. Recorded commands come from the “UI”, “UI assertion”, “Utility” command category don’t need to set an assignee for these commands. You can leave it blank or use the “default user”. |
Exception |
Optional | Checked means we are expecting to get an error for the test case. Unchecked means we are expecting to get a normal result from the test case. |
Params |
Depend on command. | JSON or XML format. If the template of parameters is rendered successfully by selecting the service, the field is required. The parameters are defaulted based on the service signature. The template of parameters includes keys of data, and you only need to fill in the value. e.g.: { “variable_name”: “value”, “variable2_name”: “value2” } Also, the parameter supports variables like CSV binding variables and context variables. You can use ${csv.xxxx} or ${xxx} to reference your variable value. If the variable value is a number, please remove the quote before $. e.g.: { “textReader”:”${csv.instanceId}”, “integer”:${number}, “decimal”:0, “text”:”${mytext}” } |
Expected Output |
Optional | Used for validating the command response. In some cases, there is a refresh button, which can be used to get default expected results. Make sure to fill out the params before clicking refresh. If refresh does not work, execute the case step without setting the expectedOutput. If passed, edit the step and click on button in the Command Editor Dialog to capture the results. Notes: The icon will appear below the Expected Output field when the wrong Params is filled out after clicking button in the Command Editor Dialog. The error message can be obtained by hovering over the icon. |
TaskName |
Required | Drop-down lists all task names in the Process Application of the Test Project which is connected to. |
Json Path |
Optional | JSON path to a variable in the output JSON data. |
Variable Name |
Optional | Variable name to save the value that the JSON path points to. This variable can be accessed via ${variable_name} in later commands in this test case. |
Comment |
Optional | Not part of any command and can be used for documenting the test case step. |
loginPortal
Log in to the BPM portal. As a result, the BPM Portal page is opened.
-
Example
loginWorkplace
Log in to the Workplace on CP4BA. As a result, the BAW Workplace page is opened.
-
Example
loginBPMoC
Log in to BPM on Cloud. As a result, the BPM on Cloud page is opened.
-
Example
openInstanceDetail
Open the current instance detail page of the BAW portal page by calling the REST API: https://[BAW Server]/ProcessPortal/launchInstanceUI?instanceId=[currentInstanceId].
-
Example
open
Open a URL.
-
Parameters
Name Required Description URL
Yes The URL to be opened. -
Example
startProcess
Start a BPM process by REST API, only exposed processes are supported by default. Install the IDA Toolkit to support all processes.
-
Parameters
Name Required Description Process
Yes The name of the process to be started. Select from the drop-down. Params
Depend on Process. Parameters in JSON or XML format required to start the process. Tip: when creating a test suite to test a Process by Generate Test Cases, the default parameters will be generated. -
Example
startExternalProcess
Start an external BPM process by REST API, only exposed processes are supported, and the snapshot must be active.
-
Parameters
Name Required Description Process App
Yes The name of the process app. Select from the drop-down. Snapshot
Yes The name of the snapshot. Select from the drop-down. Process
Yes The name of the process to be started. Select from the drop-down. Params
Depend on Process. Parameters in JSON or XML format required to start the external process. -
Example
startHumanService
Test a Human Service in stand-alone mode.
-
Parameters
Name Required Description Service
Yes The name of the Human Service to be started. Select from the drop-down. Params
Depend on Human Service. Input list in JSON or XML format required to start the Human Service. Only simple input arguments are supported. -
Example
startExposedHeritageHumanService
Test an exposed Heritage Human Service in stand-alone mode. Be sure to expose the Heritage Human Service to the specified team.
-
Parameters
Name Required Description Assignee
Refer to the common input fields description. The user should belong to the team where the service was exposed. Service
Yes The name of the Human Service to be started. Select from the drop-down. Params
Depend on Heritage Human Service. Input list in JSON or XML format required to start the Heritage Human Service. Only simple input arguments are supported. -
Example
startAjaxService
Start an AJAX service edited in Eclipse PD by REST API. To call services created in Web PD, use the startServiceFlow command.
-
Parameters
Name Required Description Exception
Optional Checked means we are expecting to get an error for the test case. Unchecked means we are expecting to get a normal result from the test case. Refer to the common input fields description. Service
Yes The name of the AJAX Service to be started. Select from the drop-down. Params
Depend on Heritage AJAX Service. Input list in JSON or XML format required to start the Heritage AJAX Service. Expected Output
If Exception
is not checked, it is mandatory. Otherwise, you need to keep it empty.Expected service output in JSON. Tip: Click on button in the Command Editor Dialog to capture the results. -
Example
Unchecked
Exception
:Checked
Exception
:
startSystemService
Start a Generic or Integration service edited in Eclipse PD. Please install the IDA Toolkit to support the system service. To call services created in Web PD, use the startServiceFlow command.
-
Parameters
Name Required Description Exception
Optional Checked means we are expecting to get an error for the test case. Unchecked means we are expecting to get a normal result from the test case. Refer to the common input fields description. Service
Yes The name of the System Service to be started. Select from the drop-down. Params
Depend on System Service. Input list in JSON or XML format required to start the System Service. Expected Output
If Exception
is not checked, it is mandatory. Otherwise, you need to keep it empty.Expected service output in JSON. Tip: Click on button in the Command Editor Dialog to capture the results. -
Example
Unchecked
Exception
:Checked
Exception
:
executeSQL
Perform an SQL Query by REST API, please install the BPM Testing Asset Toolkit to support SQL Query.
-
Parameters
Name Required Description SQL
Required SQL script. Max Rows
Optional Max rows of expected output. If empty, IDA will retrieve all rows. Data Source
Required Data source JNDI name as defined in the target BAW environment. The default dataSourceName is jdbc/TeamWorksDB. Expected Output
Required Expected output in JSON format. Tip: Click on button in the Command Editor Dialog to capture the results. Expected Rows
Optional Expected rows of results. -
Example
startUCA
Start a message UCA.
-
Parameters
Name Required Description UCA
Required Name of the message UCA, select from the drop-down. Params
Depend on UCA. UCA inputs. -
Example
startServiceFlow
Start a Service Flow by REST API developed in Web PD, please install the BPM Testing Asset Toolkit to support the system service.
-
Parameters
Name Required Description Exception
Optional Checked means we are expecting to get an error for the test case. Unchecked means we are expecting to get a normal result from the test case. Refer to the common input fields description. Service
Yes The name of the Service Flow to be started. Select from the drop-down. Params
Depend on Service Flow. Input list in JSON or XML format required to start the Service Flow. Expected Output
If Exception
is not checked, it is mandatory. Otherwise, you need to keep it empty.Expected service output in JSON. Tip: Click on button in the Command Editor Dialog to capture the results. -
Example
startAdHoc
Start an AdHoc event (deprecated) for stand-alone activities to use runAdHocActivity.
-
Parameters
Name Required Description Ad Hoc Name
Required Ad Hoc name, select from the drop-down. -
Example
runAdHocActivity
Start an AdHoc Activity, can be executed in the context of a business process instance. Can be added to a test case created based on a process or BPD.
-
Parameters
Name Required Description Ad Hoc Activity Name
Required Ad Hoc Activity Name, select from the drop-down. -
Example
runTaskByDisplayName
Run a task by display name.
-
Parameters
Name Required Description Task Name
Required Task Name, select from the drop-down. byTaskOwner
Optional Checked means the task owner will run this task. Unchecked indicates that the assigned user will run the task. -
Example
runTaskByActivityName
Run a task by Activity name. Can only be used in the context of process instance execution.
-
Parameters
Name Required Description Task Name
Required Task Name, select from the drop-down. byTaskOwner
Optional Checked means the task owner will run this task. Unchecked indicates that the assigned user will run the task. -
Example
assignTask
Assign a task to a specific user. Can only be used in the context of process instance execution.
-
Parameters
Name Required Description Task Name
Required The name of the task assigned to the specific user. Select from the drop-down. To User
Required Select from the drop-down list of users defined in IDA/BAW Configuration for the target BAW server. -
Example
claimTask
Claim a task.
-
Parameters
Name Required Description Task Name
Required The name of the task. Select from the drop-down. -
Example
finishTask
Complete a given task and set the output for the task. Can only be used in the context of process instance execution.
-
Parameters
Name Required Description Task Name
Required The name of the task. Select from the drop-down. Output
Depend on Task output, JSON format. Set this value to the output of the task. -
Example
addInstanceId
Add the process instance ID to the context. Use this command if the process was not started as part of the current use case.
-
Parameters
Name Required Description Instance ID
Required Instance ID of the process. Can be found in Web PD or in Eclipse PD. -
Example
getTaskIdByName
Get the task ID by name.
-
Parameters
Name Required Description Task Name
Required The name of the task. Select from the drop-down. -
Example
getLatestInstanceIdByProcess
Get the latest process instance ID by process name and add it to the context.
-
Parameters
Name Required Description Process Name
Required Process name to get the latest instance. Select from the drop-down. -
Example
getInstanceIdByInstanceName
Get the process instance ID by process name and instance name.
-
Parameters
Name Required Description Process Name
Required Process name to get the instance. Select from the drop-down. Instance Name
Required Instance name of the instance ID. -
Example
getInstanceIdByTaskName
Get the process instance ID by process name and task subject name.
-
Parameters
Name Required Description Process Name
Required Process name to get the instance. Select from the drop-down. Task Name
Required Task name. -
Example
getInstanceIdByTaskUrl
Get the process instance ID by the task ID in the URL. Use it by: ${context.currentInstanceId}.
-
Example
getInstanceIdByBusinessData
Get the process instance ID by process name and business data.
-
Parameters
Name Required Description Process Name
Required Process name to get the instance. Select from the drop-down. Business Data Alias
Required Business data alias name. Business Data Value
Required Actual data value. -
Example
fireTimer
Fire a timer for the current instance.
-
Parameters
Name Required Description Token
Required Timer name, selected from the drop-down. -
Example
startRestApi
Assert the REST API result.
-
Parameters
Name Required Description API Name
Required REST API name, selected from the drop-down.
Supported REST API list:
Organization(Groups)
Organization(Users)
Process(ProcessQueryEntityList)
Search(ExecuteQuery)
Task(TaskQueryEntityList)Params
Required Parameters of the REST API. Refer to https://[BAW-Server-URL]/bpmrest-ui/BPMRestAPITester/ Expected Value
Required The expected response of the REST API. -
Example
startQuery
Performs a custom search.
-
Parameters
Name Required Description Columns
Required Valid column names are taskId, instanceId, bpdName, taskSubject, taskArrived, taskStarted, taskFinished, e.g.: taskId,instanceId. Condition
Optional Query condition: "<field>|<value>" or "<field>|<op>|<value>" Sort
Optional Name of the primary sort column Second Sort
Optional Name of the secondary sort column Organization
Optional A string indicating how the results should be organized. Valid values are byTask and byInstance. The default value is byInstance. Size
Optional Specifies the maximum number of entities to be returned. If a number is not specified, the default size defined for the query will be used. Offset
Optional Specifies the number of entities to be skipped. Offset 0 refers to the first entity from the result set. If this parameter is not specified, the default value of 0 is used. Filter By Current User
Optional Filter By Current User Result
Optional The query result. Tip: Click on button in the Command Editor Dialog to capture the results. Json Path
Optional Use the JSON path to extract the output value or sub-JSON Variable Name
Optional Save Output into memory -
Example
WaitProcessInstanceStatus
Wait for the process instance status to update. Fail when timeout.
-
Parameters
Name Required Description Instance Status
Required Process instance status to check Timeout(seconds)
Required Wait timeout -
Example
GetProcessInstanceData
Get process instance data.
-
Parameters
Name Required Description Json Path
Optional Use the JSON path to extract the instance data variable or sub-JSON Variable Name
Optional Save the instance data variable or sub-JSON into memory -
Example
BPM Assertion
This category is for asserting server-side components.
Common Parameters
Name | Required | Description |
---|---|---|
Assignee |
Optional | When specified, the command is executed by the specified BAW user. The drop-down lists all BAW user names defined in the BAW Configuration the Test Project is connected to. More details refer to BAW Configuration/Add user to a BAW server. Notes: Currently, all the commands are run as the “default user”, unless manually modified. If manually modified, the following commands are run as the latest modified user until modified again. If your recorded commands come from the “BPM”, “BPM Assertion”, “Case” or “Case Assertion” command category (these commands will invoke BAW REST API or Java API), you need to choose the proper assignee based on business logic. Recorded commands come from the “UI”, “UI assertion”, “Utility” command category don’t need to set an assignee for these commands. You can leave it blank or use the “default user”. |
TaskName |
Required | Name of the task that needs to be asserted. The drop-down lists all task names in the Process Application of the Test Project which is connected to. |
Comment |
Optional | Not part of any command and can be used for documenting the test case step. |
assertProcessInstanceStatus
Check the current process instance status.
-
Parameters
Name Required Description Instance Status
Required Expected status of the current process instance.
Possible values:
Active
Completed
Failed
Terminated
Suspended -
Example
assertProcessInstanceData
Assert the data of the current process instance. Can only be used in the context of process instance execution.
-
Parameters
Name Required Description Expected Value
Required JSON object, expected value of the data.
Notes:
Before adding this step, run the test case and look at the report. In the Process Instance section, click on the click to show full data link.
Copy the shown JSON into the Expected Value as the data template. Then change the value as you need. If your data has auto-generated fields, like current dates, instance IDs or some other unique identifiers, they have to be removed from the JSON. -
Example
assertTaskAssignmentByUser
Check that the correct user is assigned (claimed) to the task. Can only be used in the context of process instance execution.
-
Example
assertTaskStatus
Check the status of a task for the current process instance.
-
Parameters
Name Required Description Task Status
Required Expected status of the task.
Valid task status values:
Received
Closed -
Example
assertNextTaskName
Check that the task is received.
-
Example
assertTaskNotGenerated
Check that the task is not generated.
-
Example
assertTaskData
Check the task data of the current process instance. It checks the variables saved in the BPM Task execution context. Use UI Assertions to check the page contents during the coach execution.
-
Parameters
Name Required Description Expected Value
Required Expected value of the data.
Notes:
Before adding this step, run the test case and look at the report. In the Task Data section, click on the click to show full data link.
Copy the JSON value into the Expected Value as the data template. Then change the value as you need. If your data has auto-generated fields, like current dates, instance IDs or some other unique identifiers, they have to be removed from the JSON. -
Example
assertServiceData
Check the current service data.
-
Parameters
Name Required Description Expected Value
Required Expected value of the data.
Notes:
Before adding this step, run the test case and look at the report. In the Service Data section, click on the click to show full data link.
Copy the JSON value into the Expected Value as the data template. Then change the value as you need. If your data has auto-generated fields, like current dates, instance IDs or some other unique identifiers, they have to be removed from the JSON. -
Example
Case
This category of commands is for calling server-side components of a case. There are a lot of common input fields. Below are some statements which are common for most of the commands in this category.
Common Parameters
Name | Required | Description |
---|---|---|
Assignee |
Optional | When specified, the command is executed by the specified BAW user. Drop down lists all BAW user names defined in the BAW Configuration the Test Project is connected to. More details refer to BAW Configuration/Add user to a BAW server. Notes: Currently, all the commands are run as the “default user”, unless manually modified. If manually modified, the following commands are run as the latest modified user until modified again. If your recorded commands come from the “BPM”, “BPM Assertion”, “Case” or “Case Assertion” command category (these commands will invoke BAW rest api or Java api), you need to choose the proper assignee based on business logic. Recorded commands that come from the “UI”, “UI assertion”, “Utility” command category don’t need to set an assignee for these commands. You can leave it blank or use the “default user”. |
Exception |
Optional | Checked means we are expecting to get an error for the test case. Unchecked means we are expecting to get a normal result from the test case. |
Params |
Depend on command. | JSON or XML format. If the template of parameters is rendered successfully by selecting the service, the field is required. The parameters are defaulted based on the service signature. The template of parameters includes keys of data, and you only need to fill in the value. e.g: { “variable_name”: “value”, “variable2_name”: “value2” } Also, the parameter supports variables like CSV binding variables and context variables. You can use ${csv.xxxx} or ${xxx} to reference your variable value. If the variable value is a number, please remove the quote before $. e.g: { “textReader”:”${csv.instanceId}”, “integer”:${number}, “decimal”:0, “text”:”${mytext}” } |
Expected Output |
Optional | Used for validating the command response. In some cases, there is a refresh button, which can be used to get default expected results. Make sure to fill out the params before clicking refresh. If refresh does not work, execute the case step without setting the expectedOutput. If passed, edit the step and click on button in the Command Editor Dialog to capture the results. Notes: The icon will appear below the Expected Output field when the wrong Params is filled out after clicking the button in the Command Editor Dialog. The error message can be obtained by hovering over the icon. |
Comment |
Optional | Not part of any command and can be used for documenting the test case step. |
loginCaseClient
Login Case Client. As a result, the Case Client page is opened.
-
Parameters
Name Required Description Solution
Required The case solution -
Example
addCase
Add a case based on the solution case type.
-
Parameters
Name Required Description Case Type
Required The current case type name Params
Required The initial case data -
Example
addCaseFolderId
Add a case folder id to the context, use it by: ${context.currentCaseFolderId}.
-
Parameters
Name Required Description Case Folder ID
Required The case folder id -
Example
addActivity
Add a discretionary activity based on the activity type.
-
Parameters
Name Required Description Activity Type Name
Required The activity type name Activity Name
Required The custom activity name -
Example
updateCaseData
Update the current case data.
-
Parameters
Name Required Description Case Type
Required The current case type name Params
Required The updated case data -
Example
runActivityByName
Run a case solution activity by name.
-
Parameters
Name Required Description Activity Name
Required The case solution activity name of the current case type Task Name
Required The task name of the selected activity. byTaskOwner
Optional(BPMN) Checked means the task owner will run this task. Unchecked indicates that the assigned user will run the task. -
Example
startManualActivity
Start a manual activity.
-
Parameters
Name Required Description Manual Activity Name
Required The manual activity name of the current case type -
Example
Case Assertion
This category is for asserting server-side components of a case.
Common Parameters
Name | Required | Description |
---|---|---|
Assignee |
Optional | When specified, the command is executed by the specified BAW user. Drop down lists all BAW user names defined in the BAW Configuration the Test Project is connected to. More details refer to BAW Configuration/Add user to a BAW server. Notes: Currently, all the commands are run as the “default user”, unless manually modified. If manually modified, the following commands are run as the latest modified user until modified again. If your recorded commands come from the “BPM”, “BPM Assertion”, “Case” or “Case Assertion” command category (these commands will invoke BAW rest api or Java api), you need to choose the proper assignee based on business logic. Recorded commands that come from the “UI”, “UI assertion”, “Utility” command category don’t need to set an assignee for these commands. You can leave it blank or use the “default user”. |
Comment |
Optional | Not part of any command and can be used for documenting the test case step. |
assertCaseState
Check the current case state.
-
Parameters
Name Required Description Case State
Required Expected state of the current case.
Possible values:
Complete
Failed
Initializing
New
Working -
Example
assertActivityState
Check the activity state of the current case.
-
Parameters
Name Required Description Activity Name
Required The name of the activity. Activity State
Required Expected state of the case activity.
Possible values:
Waiting
Ready
Started
Completed
CanceledActivity Is Required
Required Expected required state of the case activity.
Possible values:
True
FalseActivity Is Disabled
Required Expected disabled state of the case activity.
Possible values:
True
False -
Example
BA
This category of commands is for calling server-side components of a business application (available on Cloud Pak for Business Automation). There are some common input fields. Below are some statements which are common for most of the commands in this category.
Common Parameters
Name | Required | Description |
---|---|---|
Assignee |
Optional | When specified, the command is executed by the specified BAW user. Drop down lists all BAW user names defined in the BAW Configuration the Test Project is connected to. More details refer to BAW Configuration/Add user to a BAW server. Notes: Currently, all the commands are run as the “default user”, unless manually modified. If manually modified, the following commands are run as the latest modified user until modified again. If your recorded commands come from the “BPM”, “BPM Assertion”, “Case” or “Case Assertion” command category (these commands will invoke BAW rest api or Java api), you need to choose the proper assignee based on business logic. Recorded commands that come from the “UI”, “UI assertion”, “Utility” command category don’t need to set an assignee for these commands. You can leave it blank or use the “default user”. |
Comment |
Optional | Not part of any command and can be used for documenting the test case step. |
startBusinessApplication
Start the business application.
-
Parameters
Name Required Description Business Application
Required The unique name of the business application. -
Example
___
UI
In most cases, the UI commands are recorded using the IDA plugin. If you find a need to add a command manually, for example, a validation command, look at the recorded command for the element and copy the location information from it.
e.g:
Any one or combination of the recorded values can be used to identify the control: Control ID, Element ID, or XPATH. If the Label is unique on the page, it can be used as well. Enough location arguments are required to uniquely identify an element on the page. IDA cycles through available ids until it finds the element. For example, if you recorded a select step and later moved the control around on the page, the Control ID and XPATH are probably different from the recorded step, but the Element ID is still the same.
In most cases, the UI commands are recorded and displayed immediately in the IDA recorder. Commands below are only displayed after recording of some other control as the command value cannot be set immediately:
- bpmFileDropzone
- bpmFileUploader
- coachControl
Common Parameters
Name | Required | Description |
---|---|---|
Assignee |
Optional | When specified, the command is executed by the specified BAW user. Drop down lists all BAW user names defined in the BAW Configuration the Test Project is connected to. More details refer to BAW Configuration/Add user to a BAW server. Notes: Currently, all the commands are run as the “default user”, unless manually modified. If manually modified, the following commands are run as the latest modified user until modified again. If your recorded commands come from the “BPM”, “BPM Assertion”, “Case” or “Case Assertion” command category (these commands will invoke BAW rest api or Java api), you need to choose the proper assignee based on business logic. Recorded commands that come from the “UI”, “UI assertion”, “Utility” command category don’t need to set an assignee for these commands. You can leave it blank or use the “default user”. |
Value |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The value of the control. |
Control ID |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The ID of the control. Control ID is the PATH control IDs leading to the selected control id. |
Label |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The label of the control. |
Element ID |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The ID of the element. |
Element CSS |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The CSS of the element. |
XPATH |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The xpath of the control. |
Comment |
Optional | Not part of any command and can be used for documenting the test case step. |
Notes: The element is first obtained through the Control ID. If it fails, the label, Element ID, and Element CSS are then used in turn. Finally, the XPATH is used. If successful, the rest will not be used.
bpmFileDropzone
Upload a file to the BAW server by using the Dropzone control.
-
Parameters
Name Required Description Value
Required Name of the BPM file. Control ID
Required Control ID of the BPM file drop zone. -
Example
bpmFileUploader
BPM file uploader. UI.bpmFileUploader can’t be replayed on the IDA Plugin due to browser security issues, but this command can work on the Selenium Grid. So you can record the file upload commands by the IDA Plugin, but replay them on the Selenium Grid.
-
Parameters
Name Required Description Value
Required Name of the BPM file. Control ID
Required The control id of the BPM file that needs to be uploaded. -
Example
checkbox
Set the value of the checkbox control.-
Parameters
Name Required Description Value
Required The value of the checkbox to operate on. Select Options
Required Checkbox operation, Select or Unselect. Select: to check the checkbox. Unselect: to clear the checkbox. -
Example
click
Click an element by id, CSS, or xpath. Notes: The BPM UI toolkit has an id on a button, but Coach v8 and BP3 do not. Thus, the latter two can only be identified by XPATH. Moving the coach view around the page may change its xpath and break the test case.
-
Parameters
Name Required Description Type
Optional Link or Button. Trigger Event
Optional The JavaScript event triggered by the click. -
Example
coachControl
Set the value of the coach control. This is a generic setter. The value should match the selected control type.
-
Parameters
Name Required Description Value Type
Optional Select the type from the drop-down. Default Value
Optional Default value of the control. -
Example
___
confirmOK
Click the OK button for window.confirm and return true. This isn’t supported in the IDA plugin. It needs to be added to the test case manually when used and can work fine in Selenium.
-
Example
confirmCancel
Click the Cancel button for window.confirm and return false. This isn’t supported in the IDA plugin. It needs to be added to the test case manually when used and can work fine in Selenium.
-
Example
doubleClick
Double-click an element by id, CSS, or xpath. This is similar to click. It needs to be added to the test case manually when used.
-
Example
file
Upload a file. UI.file can’t be replayed on the IDA Plugin due to browser security issues, but this command can work on the Selenium Grid. So you can record the file upload commands by the IDA Plugin, but replay them on the Selenium Grid.
-
Parameters
Name Required Description Value
Required The filename that needs to be uploaded. -
Example
close
Close the currently opened browser.
-
Example
radio
Set the value of the radio control.
-
Parameters
Name Required Description Value
Required The value of the radio to select. The value should be the LABEL on the CV control.
e.g:
The value should be set to Make a selection. -
Example
saveCoachControl
Put the control value into a key.
Tip:
a) record a step to set the value of the control;
b) edit the recorded step in the Command Editor and change the command to saveCoachControl;
c) set the Key.
If the control you try to save is read-only, record any other controls which are at the same level (e.g., in the container). Modify the Control ID path to match the control you are trying to save.
-
Parameters
Name Required Description Key
Required Name of a variable, which can later be referenced as ${key} in a value field of any command. Property
Optional When the control binds a complex object, you can get the value from the complex object by property.
e.g.:
bindingObject.value -
Example
saveText
Save text into the context. Can put the output text, single select, and input value to a key.
-
Parameters
Name Required Description Key
Required Name of a variable, which can later be referenced as ${key} in a value field of any command. -
Example
select
Set the value of the select (drop-down) control. The value is a JSON list of selected display values for this Select or Multi-Select CV.
e.g.:["Selected value1","Selected value2"]
-
Example
selectWindow
Select a window by window information.
-
Parameters
Name Required Description Info
Required Window information. -
Example
text
Set the value of any control, which UI accepts textual input. Examples: input text CV, Integer CV, Date Picker. This event is captured when the control loses focus. So it is possible for some controls like Date Picker to record two steps. One for an empty value and the other for the actual value. This is because the first empty data is captured when the mouse focus moves from the control to the Date select popup. Users can remove the first recorded case step or just keep them as-is.
-
Example
waitElement
Wait for an element to be visible/hidden/editable/read-only until the timeout. Fail when the timeout is reached.
-
Parameters
Name Required Description Type
Required Select the element type from the drop-down. Visible, Hidden, Editable, and Readonly. Timeout
Optional The maximum time to wait for the element. If empty, use engine-config.wait-timeout set on ida.properties. -
Example
waitTextPresent
Wait for a text to be displayed until the timeout. Fail when the timeout is reached.
-
Parameters
Name Required Description Text
Required Text waiting to be displayed on the page. Timeout
Optional The maximum time to wait for the element. If empty, use engine-config.wait-timeout set on ida.properties. -
Example
clickActivityFromPortal
Click an activity from the portal.
-
Parameters
Name Required Description Activity
Required The activity name Process
Optional The process name Track
Optional The track name -
Example
UI Assertion
Record a command to populate the field you want to assert. Then edit the generated test case step and change the command to assert. The edit would pick up matching fields from the recorded command.
Common Parameters
Name | Required | Description |
---|---|---|
Assignee |
Optional | When specified, the command is executed by the specified BAW user. Drop down lists all BAW user names defined in the BAW Configuration the Test Project is connected to. More details refer to BAW Configuration/Add user to a BAW server. Notes: Currently, all the commands are run as the “default user”, unless manually modified. If manually modified, the following commands are run as the latest modified user until modified again. If your recorded commands come from the “BPM”, “BPM Assertion”, “Case” or “Case Assertion” command category (these commands will invoke BAW rest api or Java api), you need to choose the proper assignee based on business logic. Recorded commands that come from the “UI”, “UI assertion”, “Utility” command category don’t need to set an assignee for these commands. You can leave it blank or use the “default user”. |
Control ID |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The ID of the control. Control ID is the PATH control IDs leading to the selected control id. |
Label |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The label of the control. |
Element ID |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The ID of the element. |
Element CSS |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The CSS of the element. |
XPATH |
Optional, fields Value , Control ID , Label , Element ID , Element CSS and XPATH must be filled in at least one of them. |
The xpath of the control. |
Expected Value |
Required | The expected value of the control |
Comment |
Optional | Not part of any command and can be used for documenting the test case step. |
Notes: The element is first obtained through the Control ID. If it fails, the label, Element ID, and Element CSS are then used in turn. Finally, the XPATH is used. If successful, the rest will not be used.
assertButtons
Check if the buttons are rendered or not.
-
Parameters
Name Required Description Texts
Required Text of the buttons that you want to render.
e.g.:
If you want to check that all the buttons are rendered in this form, you can fill it in like this:Save
Cancel
Notes: Texts are separated by the line break.Expected Visibility
Required The expected visibility of the control. Select from the drop-down. Enabled, Disabled, and Hidden. -
Example
assertCheckbox
Assert checkbox value and options.
-
Parameters
Name Required Description Checked Labels
Required Labels of checkboxes that are expected to be checked.
e.g.:
To verify the options on this page, fill in like this:Create Position Request CSHS
GM Approval CSHS
.
Notes: Labels are separated by the line break.Expected Options
Required Labels of all options that are expected to be rendered.
e.g.: If you want to check that all the checkbox options are rendered in the figure above, you can fill in like this:Create Position Request CSHS
Find Candidates CSHS
GM Approval CSHS
Notes: Labels are separated by the line break. -
Example
assertCoachControl
Assert Coach Control binding value and visibility. It only supports String, Number, Date, and Boolean types of binding values now. Either the Control ID or label is required. The Control ID is the coach view Control ID, and the label is the coach view label.
-
Parameters
Name Required Description Expected Value Type
Required The value Type of the control, select from the drop-down. String, Number, Date(MM/dd/yyyy), and Boolean. Expected Visibility
Required The visibility of the control. Select from the drop-down. Enabled, Disabled, and Hidden. -
Example
assertDatePicker
Assert the date picker value.
-
Parameters
Name Required Description Expected Date
Required The expected date of the DatePicker -
Example
assertElement
Assert the element value and visibility.
-
Parameters
Name Required Description Expected visibility
Required The visibility of the control. Select from the drop-down. Enabled, Disabled, and Hidden. -
Example
assertInputText
Check the coach text field value. If you check the regular expression, it will use the expected value as a regular expression to match the actual value.
-
Parameters
Name Required Description Expected Max Length
Optional Expected maximum length of the text. -
Example
assertOutputText
Check the coach output text value.
-
Example
assertRadio
Assert Radio value and options.
-
Parameters
Name Required Description Checked Label
Required Label of the radio box that is expected to be checked. Expected Options
Required Labels of all options that are expected to be rendered. Refer to the statements of Expected Options in assertCheckbox. -
Example
assertSelect
Assert Select value and options.
-
Parameters
Name Required Description Expected Value
Required The expected value of the control. If it is a multi-select, the value is separated by the line break. Expected Options
Required Labels of select options that are expected to be rendered. Refer to the statements of Expected Options in assertCheckbox. -
Example
assertSwitch
Assert the Switch box.
-
Example
assertTableContent
Assert the cell value of the table.
-
Parameters
Name Required Description Column Name
Required The name of the column where the value needs to be asserted. Column Name is used prior to Column Number to match the column. Column Number
Optional The number of the column where the value needs to be asserted. Required if Column Name can not be specified. Row Number
Required The number of the row where the value needs to be validated. Expected value
Required The cell value that needs to be checked. -
Example
assertTableRows
Assert the total number of rows in the table.
-
Parameters
Name Required Description Expected Rows
Required The expected total number of rows in the table. -
Example
assertTextarea
Assert the textarea value.
-
Example
assertTextNotPresent
Assert that the text does not appear on the UI.
-
Parameters
Name Required Description Text
Required The text that is not expected to appear on the UI. -
Example
assertTextPresent
Assert that the text appears on the UI.
-
Parameters
Name Required Description Text
Required The text that is expected to appear on the UI. -
Example
assertValidationPassed
Check whether the coach page has passed the validation or not.
-
Example
Utility
This category provides utility commands.
Name | Required | Description |
---|---|---|
Assignee |
Optional | When specified, the command is executed by the specified BAW user. The drop-down lists all BAW user names defined in the BAW Configuration the Test Project is connected to. More details refer to BAW Configuration/Add user to a BAW server. Notes: Currently, all the commands are run as the “default user”, unless manually modified. If manually modified, the following commands are run as the latest modified user until modified again. If your recorded commands come from the “BPM”, “BPM Assertion”, “Case” or “Case Assertion” command category (these commands will invoke BAW rest api or Java api), you need to choose the proper assignee based on business logic. Recorded commands that come from the “UI”, “UI assertion”, “Utility” command category don’t need to set an assignee for these commands. You can leave it blank or use the “default user”. |
Comment |
Optional | Not part of any command and can be used for documenting the test case step. |
addContext
Append another value to this key.
-
Parameters
Name Required Description Key
Required Name of the key. Value
Required Value that needs to be appended. -
Example
dateString
Generate a date string before/after a number of days from today. If the key is not specified, then the default key is “DATE_STRING”. You can use the date string by ${context.DATE_STRING}.
-
Parameters
Name Required Description Key
Optional Name of the key. Default is DATE_STRING
.Days
Optional The number of days from the current date that you want to convert to a string. A negative number of days means before today, while a positive number of days means after today.
e.g.: -1 means generating a string of the date of yesterday. Default is0
.Format
Optional Format of the date. Default is MM/dd/YYYY
. -
Example
debug
Command for debugging, recording of the case will stop at this step.
-
Parameters
Name Required Description Log
Optional Log text will be shown in the console.
putContext
Put a new key-value pair into the context.
-
Parameters
Name Required Description Key
Required Name of the key. Value
Required Value that needs to be put into the context.
wait
Wait for a specified number of seconds.
-
Parameters
Name Required Description Time
Required The number of seconds to wait.
randomString
Generate a random string of a specified length with a key.
-
Parameters
Name Required Description Key
Optional Key name for the generated random string, default value is “RANDOM_STRING”. Length
Required Length of the generated random string. -
Example
No key name, just use the default value “RANDOM_STRING”.
Use a key name, e.g., SKey1.
randomNumber
Generate a random number of a specified length with a key.
-
Parameters
Name Required Description Key
Optional Key name for the generated random number, default value is “RANDOM_NUMBER”. Length
Required Length of the generated random number. -
Example
No key name, just use the default value “RANDOM_NUMBER”.
Use a key name, e.g., Key1.