I would greatly appreciate help in understanding how I might test a user message that responds to a multi-select bot message, meaning that the bot message is a list of items with checkboxes, and the user checks whatever they want then clicks the “Submit” button. The bot message has the options “Personal or family history of allergy”, “Obesity”, “Missed vaccine”, and “Recent physical injury.”
It appears in the logs at the bottom of this question that the multi-select is described as a “form” with name “choices.” I have attached a photo of what the message looks like on the client side. I believe that the goal in replicating this message in Botium is to get the user message’s “value” field to equal an array of the options listed above.
I have also attached a photo of what the conversation should look like for reference.
I have tried a lot of different formats for sending the responding user message including the one in this sample (botium-connector-directline3/form.convo.txt at master · codeforequity-at/botium-connector-directline3 · GitHub), but none have worked so far. I am still actively working on this, but thought I’d submit the question in case I continue to struggle.
Here are snippets of the different formats I’ve tried:
#me
FORM choices|Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury
BUTTON Continue
#me
FORM choices|["Personal or family history of allergy","Obesity","Missed vaccine","Recent physical injury"]
BUTTON Continue
#me
FORM ["Personal or family history of allergy","Obesity","Missed vaccine","Recent physical injury"]
BUTTON Continue
#me
FORM Personal or family history of allergy
FORM Obesity
FORM Missed vaccine
FORM Recent physical injury
BUTTON Continue
Logs:
(Note: The “Fever” symptom came from an earlier part in the conversation. The desired result is that after the user selects options from the multi-select, we append those options to the list starting with “Fever." I have attached a photo for reference.)
MyGlobalLogicHook onBotStart symptom_checker.convo.txt/Line 43, args: [], expected: The following symptoms may be related to potential risk factors. Do you have any of these symptoms?
botium-connector-directline3 received message {
"type": "message",
"id": "GjbMpYmqqp2DK4s196wgiy-o|0000025",
"timestamp": "2021-05-06T20:31:27.3686498Z",
"serviceUrl": "https://directline.botframework.com/",
"channelId": "directline",
"from": {
"id": "HybridBotStage@PNoEIQIc82Q",
"name": "HybridBotStage"
},
"conversation": {
"id": "GjbMpYmqqp2DK4s196wgiy-o"
},
"recipient": {
"id": "HybridBotStage@PNoEIQIc82Q",
"name": "HybridBotStage"
},
"locale": "en-US",
"text": "The following symptoms may be related to potential risk factors. Do you have any of these symptoms?\n",
"speak": "The following symptoms may be related to potential risk factors. Do you have any of these symptoms?\n",
"inputHint": "expectingInput",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"actions": [
{
"title": "Continue",
"type": "Action.Submit"
}
],
"body": [
{
"items": [
{
"choices": [
{
"title": "Obesity",
"value": "Obesity"
},
{
"title": "Missed vaccine",
"value": "Missed vaccine"
},
{
"title": "Personal or family history of allergy",
"value": "Personal or family history of allergy"
},
{
"title": "Recent physical injury",
"value": "Recent physical injury"
},
{
"title": "None of the above",
"value": "None of the above"
}
],
"id": "choices",
"isMultiSelect": true,
"style": "expanded",
"type": "Input.ChoiceSet"
}
],
"type": "Container"
}
],
"type": "AdaptiveCard",
"version": "1.0"
}
}
]
} +1s
botium-core-Convo symptom_checker.convo.txt: bot says (cleaned by binary and base64 data and sourceData) {
botium-core-Convo "sender": "bot",
botium-core-Convo "media": [],
botium-core-Convo "buttons": [],
botium-core-Convo "cards": [
botium-core-Convo {
botium-core-Convo "text": [],
botium-core-Convo "image": false,
botium-core-Convo "buttons": [
botium-core-Convo {
botium-core-Convo "text": "Continue"
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "media": false,
botium-core-Convo "forms": [
botium-core-Convo {
botium-core-Convo "name": "choices",
botium-core-Convo "type": "ChoiceSet",
botium-core-Convo "options": [
botium-core-Convo {
botium-core-Convo "title": "Obesity",
botium-core-Convo "value": "Obesity"
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "title": "Missed vaccine",
botium-core-Convo "value": "Missed vaccine"
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "title": "Personal or family history of allergy",
botium-core-Convo "value": "Personal or family history of allergy"
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "title": "Recent physical injury",
botium-core-Convo "value": "Recent physical injury"
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "title": "None of the above",
botium-core-Convo "value": "None of the above"
botium-core-Convo }
botium-core-Convo ]
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "cards": null,
botium-core-Convo "sourceData": {
botium-core-Convo "actions": [
botium-core-Convo {
botium-core-Convo "title": "Continue",
botium-core-Convo "type": "Action.Submit"
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "body": [
botium-core-Convo {
botium-core-Convo "items": [
botium-core-Convo {
botium-core-Convo "choices": [
botium-core-Convo {
botium-core-Convo "title": "Obesity",
botium-core-Convo "value": "Obesity"
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "title": "Missed vaccine",
botium-core-Convo "value": "Missed vaccine"
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "title": "Personal or family history of allergy",
botium-core-Convo "value": "Personal or family history of allergy"
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "title": "Recent physical injury",
botium-core-Convo "value": "Recent physical injury"
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "title": "None of the above",
botium-core-Convo "value": "None of the above"
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "id": "choices",
botium-core-Convo "isMultiSelect": true,
botium-core-Convo "style": "expanded",
botium-core-Convo "type": "Input.ChoiceSet"
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "type": "Container"
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "type": "AdaptiveCard",
botium-core-Convo "version": "1.0"
botium-core-Convo }
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "forms": [],
botium-core-Convo "messageText": "The following symptoms may be related to potential risk factors. Do you have any of these symptoms?\n",
botium-core-Convo "channel": "default"
botium-core-Convo } +1s
botium-core-ScriptingMemory fill start: {} +1s
botium-core-ScriptingMemory fill end: {} +0ms
botium-core-ScriptingProvider assertBotResponse symptom_checker.convo.txt/Line 43 (Line 37: #me - 12) BOT: The following symptoms may be related to potential risk factors. Do you have any of these symptoms? = The following symptoms may be related to potential risk factors. Do you have any of these symptoms? ... +1s
MyGlobalLogicHook onBotEnd symptom_checker.convo.txt/Line 43, args: [], expected: The following symptoms may be related to potential risk factors. Do you have any of these symptoms?, meMessage: The following symptoms may be related to potential risk factors. Do you have any of these symptoms?
MyGlobalLogicHook onMeStart symptom_checker.convo.txt/Line 52, args: [], meMessage: null
botium-core-Convo symptom_checker.convo.txt/Line 52: user says (cleaned by binary and base64 data and sourceData) {
botium-core-Convo "sender": "me",
botium-core-Convo "channel": null,
botium-core-Convo "not": false,
botium-core-Convo "optional": false,
botium-core-Convo "messageText": "Continue",
botium-core-Convo "media": null,
botium-core-Convo "buttons": [
botium-core-Convo {
botium-core-Convo "text": null,
botium-core-Convo "payload": "Continue"
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "cards": null,
botium-core-Convo "forms": [
botium-core-Convo {
botium-core-Convo "name": "choices",
botium-core-Convo "value": "Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury",
botium-core-Convo "options": null
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "attachments": null,
botium-core-Convo "asserters": [],
botium-core-Convo "userInputs": [
botium-core-Convo {
botium-core-Convo "name": "FORM",
botium-core-Convo "args": [
botium-core-Convo "choices",
botium-core-Convo "Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury"
botium-core-Convo ]
botium-core-Convo },
botium-core-Convo {
botium-core-Convo "name": "BUTTON",
botium-core-Convo "args": [
botium-core-Convo "Continue"
botium-core-Convo ]
botium-core-Convo }
botium-core-Convo ],
botium-core-Convo "logicHooks": []
botium-core-Convo } +11ms
botium-connector-directline3 UserSays called +16ms
botium-connector-directline3 Posting activity {
"type": "event",
"name": "Continue",
"from": {
"id": "me"
},
"value": {
"choices": "Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury"
}
} +0ms
postActivity { type: 'event',
name: 'Continue',
from: { id: 'me' },
value:
{ choices:
'Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury' } }
botium-connector-directline3 Posted activity, assigned ID: GjbMpYmqqp2DK4s196wgiy-o|0000026 +582ms
MyGlobalLogicHook onMeEnd symptom_checker.convo.txt/Line 52, args: [], meMessage: null
botium-core-Convo symptom_checker.convo.txt wait for bot +583ms
MyGlobalLogicHook onBotStart symptom_checker.convo.txt/Line 56, args: [], expected: The following symptoms have been reported:
Fever
Obesity
Missed vaccine
Personal or family history of allergy
Recent physical injury
botium-connector-directline3 received message {
"type": "message",
"id": "GjbMpYmqqp2DK4s196wgiy-o|0000027",
"timestamp": "2021-05-06T20:31:28.0938052Z",
"serviceUrl": "https://directline.botframework.com/",
"channelId": "directline",
"from": {
"id": "HybridBotStage@PNoEIQIc82Q",
"name": "HybridBotStage"
},
"conversation": {
"id": "GjbMpYmqqp2DK4s196wgiy-o"
},
"recipient": {
"id": "HybridBotStage@PNoEIQIc82Q",
"name": "HybridBotStage"
},
"locale": "en-US",
"text": "The following symptoms have been reported:\n* Fever\n",
"speak": "The following symptoms have been reported:\n* Fever\n",
"inputHint": "expectingInput"
} +17ms
botium-core-Convo symptom_checker.convo.txt: bot says (cleaned by binary and base64 data and sourceData) {
botium-core-Convo "sender": "bot",
botium-core-Convo "media": [],
botium-core-Convo "buttons": [],
botium-core-Convo "cards": [],
botium-core-Convo "forms": [],
botium-core-Convo "messageText": "The following symptoms have been reported:\n* Fever\n",
botium-core-Convo "channel": "default"
botium-core-Convo } +18ms
botium-core-ScriptingMemory fill start: {} +612ms
botium-core-ScriptingMemory fill end: {} +0ms
botium-core-ScriptingProvider assertBotResponse symptom_checker.convo.txt/Line 56 (Line 52: #me - FORM(choices,Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury) UI: BUTTON(Continue)) BOT: The following symptoms have been reported: * Fever = The following symptoms have been reported: Fever Obesity Missed vaccine Personal or family history of allergy Recent physical injury ... +612ms
MyGlobalLogicHook onConvoEnd symptom_checker.convo.txt, conversation length: 16 steps
botium-cli-run symptom_checker.convo.txt failed: { TranscriptError: symptom_checker.convo.txt/Line 56: Bot response (on Line 52: #me - FORM(choices,Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury) UI: BUTTON(Continue)) "The following symptoms have been reported: * Fever" expected to match "The following symptoms have been reported: Fever Obesity Missed vaccine Personal or family history of allergy Recent physical injury"
botium-cli-run at Convo.Run (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:256:15)
botium-cli-run name: 'TranscriptError',
botium-cli-run transcript:
botium-cli-run Transcript {
botium-cli-run steps:
botium-cli-run [ [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep],
botium-cli-run [TranscriptStep] ],
botium-cli-run attachments: [],
botium-cli-run scriptingMemory: {},
botium-cli-run convoBegin: 2021-05-06T20:31:12.242Z,
botium-cli-run convoEnd: 2021-05-06T20:31:28.148Z,
botium-cli-run err:
botium-cli-run { BotiumError: symptom_checker.convo.txt/Line 56: Bot response (on Line 52: #me - FORM(choices,Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury) UI: BUTTON(Continue)) "The following symptoms have been reported: * Fever" expected to match "The following symptoms have been reported: Fever Obesity Missed vaccine Personal or family history of allergy Recent physical injury"
botium-cli-run at ScriptingProvider.assertBotResponse (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/ScriptingProvider.js:145:17)
botium-cli-run at Convo.runConversation (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:437:40) name: 'BotiumError', context: [Object] } },
botium-cli-run cause:
botium-cli-run { BotiumError: symptom_checker.convo.txt/Line 56: Bot response (on Line 52: #me - FORM(choices,Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury) UI: BUTTON(Continue)) "The following symptoms have been reported: * Fever" expected to match "The following symptoms have been reported: Fever Obesity Missed vaccine Personal or family history of allergy Recent physical injury"
botium-cli-run at ScriptingProvider.assertBotResponse (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/ScriptingProvider.js:145:17)
botium-cli-run at Convo.runConversation (/Users/user/.nvm/versions/node/v10.13.0/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:437:40)
botium-cli-run name: 'BotiumError',
botium-cli-run context:
botium-cli-run { type: 'asserter',
botium-cli-run source: 'TextMatchAsserter',
botium-cli-run context: [Object],
botium-cli-run cause: [Object],
botium-cli-run message:
botium-cli-run 'symptom_checker.convo.txt/Line 56: Bot response (on Line 52: #me - FORM(choices,Personal or family history of allergy;Obesity;Missed vaccine;Recent physical injury) UI: BUTTON(Continue)) "The following symptoms have been reported: * Fever" expected to match "The following symptoms have been reported: Fever Obesity Missed vaccine Personal or family history of allergy Recent physical injury"',
botium-cli-run input: [ConvoStep],
botium-cli-run transcript: [Array] } } } +16s
1) symptom_checker.convo.txt
botium-connector-directline3 Stop called +11ms
botium-connector-directline3 unsubscribed from directline activity subscription +1ms
botium-connector-directline3 unsubscribing from directline connectionstatus subscription +0ms
botium-connector-directline3 ending directline connection +0ms
botium-connector-directline3 Clean called +1ms
botium-connector-BaseContainer Cleanup rimrafing temp dir /Users/user/botium/DL/foo1/spec/botiumwork/My Botium Project 20210506 133111 uL2K8 +0ms
``` 