codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
231 stars 64 forks source link

Issue with Form submit using directline. #415

Closed DipaliK9 closed 4 years ago

DipaliK9 commented 5 years ago

I am using botium-cli version :0.0.56 and botium-directline3 version: 0.0.15. When I execute >botium-cli run it does not identify button click. It considers button click as text. E.g.

me

FORM startDate|10-10-2019 FORM endDate|10-10-2019 FORM leaveType|1 BUTTON Submit

It considers submit as text and bot gives response for text Submit. Instead of submitting the form values. Please help.

codeforequity-at commented 5 years ago

does this help ?

https://botium.atlassian.net/wiki/spaces/BOTIUM/pages/63209497/How+Can+I+Simulate+Buttons+with+my+Azure+Bot

DipaliK9 commented 5 years ago

I am not sure if it is correct but I added value of all buttons in botium.json and I am always getting error bot says nothing. "DIRECTLINE3_BUTTON_TYPE": "message", "DIRECTLINE3_BUTTON_VALUE_FIELD": "Submit,Yes,No", "DIRECTLINE3_HANDLE_ACTIVITY_TYPES": "message,event"

Error Log: 1 failing

1) Botium Test-Suite SubmitLeave_OracleUpdateNeeded: TranscriptError: SubmitLeave_OracleUpdateNeeded/Line 37: bot says nothing at async.waterfall (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:227:25) at wrapper (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:272:20) at next (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:4584:24) at C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:325:20 at runConversation (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:205:15) at async.mapSeries (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:442:9) at err (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:252:13) at wrapper (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:272:20) at iterateeCallback (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:417:21) at C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:325:20 at _iteratee (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:249:17) at convoStepDone (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:272:11) at scriptingEvents.onBotStart.then.then (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:346:24)

codeforequity-at commented 5 years ago

DIRECTLINE3_BUTTON_TYPE and DIRECTLINE3_BUTTON_VALUE_FIELD are the capabilities to use. It depends on the implementation of your backend. DIRECTLINE3_BUTTON_TYPE you should set to the activity type the implementation is listening (typically event or message), and the DIRECTLINE3_BUTTON_VALUE_FIELD is the name of the activity field holding the button text (typically name or text).

DipaliK9 commented 5 years ago

"value": { "val": "Submit", "startDate": "2019-10-01", "endDate": "2019-10-01", } Based on the json below I updated the value to "DIRECTLINE3_BUTTON_TYPE": "message", "DIRECTLINE3_BUTTON_VALUE_FIELD": "val", "DIRECTLINE3_HANDLE_ACTIVITY_TYPES": "message,event"

I am still getting error bot says nothing.

codeforequity-at commented 5 years ago

Let's make it the other way round: do you know the implementation details of your chatbot ? do you know how a button click is handled in your bot framework app ?

DipaliK9 commented 5 years ago

yes, Let me know what information you need.

codeforequity-at commented 5 years ago
  1. what is the activity type you are listening for button clicks ?
  2. how do you decide what button has been clicked ? what field of the activity holds the name of the clicked button ?
DipaliK9 commented 5 years ago
  1. what is the activity type you are listening for button clicks ? "type": "message"
  2. how do you decide what button has been clicked ? what field of the activity holds the name of the clicked button ? Based on value of val we make out which button is clicked. "value": { "val": "Submit", "startDate": "2019-10-01", "endDate": "2019-10-01", },
codeforequity-at commented 5 years ago

OK, now I understand the problem. Currently, it is not possible to map the button text to a sub-field of the activity. It's only a small change, will be part of the next build.

DipaliK9 commented 5 years ago

When can I get the fixed build tentatively. And meanwhile is there any workaround?

DipaliK9 commented 5 years ago

Any update on this?

codeforequity-at commented 5 years ago

no workaround. will be part of the october build.

codeforequity-at commented 5 years ago

Just noticed there actually is a workaround in your case - you can add do this to set the val to Submit in your activity:

#me
FORM startDate|10-10-2019
FORM endDate|10-10-2019
FORM leaveType|1
FORM val|Submit
DipaliK9 commented 5 years ago

I tried it. However, it is sending "#me null" and in response bot says nothing.

$ botium-cli run mochawesome

Botium Test-Suite 1) SubmitLeave_OracleUpdateNeeded

0 passing (33s) 1 failing

1) Botium Test-Suite : TranscriptError: test/Line 28: bot says nothing at async.waterfall (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:227:25) at wrapper (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:272:20) at next (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:4584:24) at C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:325:20 at runConversation (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:205:15) at async.mapSeries (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:442:9) at err (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:252:13) at wrapper (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:272:20) at iterateeCallback (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:417:21) at C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:325:20 at _iteratee (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:249:17) at convoStepDone (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:272:11) at scriptingEvents.onBotStart.then.then (C:\Users..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:346:24)

codeforequity-at commented 5 years ago

How does the activity which is sent look like ? It contains no text, that's fine, but there definitely should be included the form values - pls post debug mode output.

DipaliK9 commented 5 years ago

Hi,

Please see the log as given below


.... ~/Documents/../../botium-connector-directline3 (master)
$ export DEBUG=testmybot*,botium*

.... ~/Documents/../../botium-connector-directline3 (master)
$ botium-cli run mochawesome
2019-11-05T11:30:13.174Z botium-cli Using Botium configuration file ./botium.json
2019-11-05T11:30:13.177Z botium-cli-run command options: { _: [ 'run' ],
  verbose: false,
  v: false,
  convos: [ '.' ],
  C: [ '.' ],
  config: './botium.json',
  c: './botium.json',
  output: 'mochawesome',
  testsuitename: 'Botium Test-Suite',
  n: 'Botium Test-Suite',
  expandutterances: false,
  expandscriptingmemory: false,
  timeout: 60,
  '$0':
   '..\\..\\..\\..\\..\\..\\AppData\\Roaming\\npm\\node_modules\\botium-cli\\bin\\botium-cli.js' }
2019-11-05T11:30:13.177Z botium-cli-run Mocha Reporter "mochawesome", options: undefined
2019-11-05T11:30:13.179Z botium-BotDriver Loaded Botium configuration file ./botium.json
2019-11-05T11:30:13.180Z botium-BotDriver Loaded Botium configuration file ./botium.json
2019-11-05T11:30:13.180Z botium-BotDriver Changed capability CONFIG to "./botium.json" using environment variables.
2019-11-05T11:30:13.180Z botium-BotDriver BuildCompiler: Capabilites: { PROJECTNAME: 'Prazna',
  TEMPDIR: 'botiumwork',
  CLEANUPTEMPDIR: true,
  WAITFORBOTTIMEOUT: 10000,
  SIMULATE_WRITING_SPEED: false,
  DOCKERCOMPOSEPATH: 'docker-compose',
  DOCKERMACHINEPATH: 'docker-machine',
  DOCKERMACHINE: false,
  DOCKERIMAGE: 'node:boron',
  DOCKERUNIQUECONTAINERNAMES: false,
  DOCKERSYSLOGPORT_RANGE: '47100-47299',
  BOT_HEALTH_STATUS: 200,
  SLACK_PUBLISHPORT_RANGE: '46100-46299',
  FACEBOOK_PUBLISHPORT_RANGE: '46300-46499',
  FACEBOOK_SEND_DELIVERY_CONFIRMATION: true,
  BOTFRAMEWORK_PUBLISHPORT_RANGE: '46500-46699',
  BOTFRAMEWORK_WEBHOOK_PORT: 3978,
  BOTFRAMEWORK_WEBHOOK_PATH: 'api/messages',
  BOTFRAMEWORK_CHANNEL_ID: 'facebook',
  SIMPLEREST_PING_RETRIES: 6,
  SIMPLEREST_PING_TIMEOUT: 10000,
  SIMPLEREST_PING_VERB: 'GET',
  SIMPLEREST_METHOD: 'GET',
  WEBSPEECH_SERVER_PORT: 46050,
  WEBSPEECH_LANGUAGE: 'en-US',
  WEBSPEECH_CLOSEBROWSER: true,
  SCRIPTING_TXT_EOL: '\n',
  SCRIPTING_XLSX_EOL_WRITE: '\r\n',
  SCRIPTING_XLSX_STARTROW: 2,
  SCRIPTING_XLSX_STARTCOL: 1,
  SCRIPTING_NORMALIZE_TEXT: true,
  SCRIPTING_ENABLE_MEMORY: false,
  SCRIPTING_ENABLE_MULTIPLE_ASSERT_ERRORS: false,
  SCRIPTING_MATCHING_MODE: 'wildcardLowerCase',
  SCRIPTING_UTTEXPANSION_MODE: 'All',
  SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
  SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
  RETRY_USERSAYS_ONERROR_REGEXP: [],
  RETRY_USERSAYS_NUMRETRIES: 1,
  RETRY_USERSAYS_FACTOR: 1,
  RETRY_USERSAYS_MINTIMEOUT: 1000,
  ASSERTERS: [],
  LOGIC_HOOKS: [],
  USER_INPUTS: [],
  CONTAINERMODE: 'directline3',
  DIRECTLINE3_SECRET: 'FLDK8rAxS7U.nv4FMjIk21PJKdfcP0OXsRm4sInZR9UsH6iajKZa72I',
  DIRECTLINE3_WEBSOCKET: true,
  DIRECTLINE3_POLLINGINTERVAL: 1000,
  DIRECTLINE3_BUTTON_TYPE: 'message',
  DIRECTLINE3_BUTTON_VALUE_FIELD: '_activity.value.val',
  DIRECTLINE3_HANDLE_ACTIVITY_TYPES: 'message',
  CONFIG: './botium.json' }
2019-11-05T11:30:13.248Z botium-ScriptingProvider Using matching mode: wildcardLowerCase
2019-11-05T11:30:13.248Z botium-asserterUtils Loaded Default asserter - [ 'BUTTONS',
  'MEDIA',
  'CARDS',
  'PAUSE_ASSERTER',
  'ENTITIES',
  'ENTITY_VALUES',
  'INTENT',
  'INTENT_UNIQUE',
  'INTENT_CONFIDENCE',
  'JSON_PATH',
  'RESPONSE_LENGTH' ]
2019-11-05T11:30:13.248Z botium-asserterUtils Loaded Default logic hook - [ 'PAUSE',
  'WAITFORBOT',
  'SET_SCRIPTING_MEMORY',
  'CLEAR_SCRIPTING_MEMORY',
  'UPDATE_CUSTOM',
  'INCLUDE' ]
2019-11-05T11:30:13.249Z botium-asserterUtils Loaded Default user input - [ 'BUTTON', 'MEDIA', 'FORM' ]
2019-11-05T11:30:13.259Z botium-ScriptingProvider ReadConvosFromDirectory(.) found filenames: spec/convo/SubmitLeave_OracleUpdateNeeded.convo.txt
2019-11-05T11:30:13.264Z botium-ScriptingProvider ReadConvosFromDirectory(.) found convos:
 1 SubmitLeave_OracleUpdateNeeded (This test case checks that if  time sheet is not updated since long time then it gives proper message
) ({ convoDir: '.',
  filename: 'spec/convo/SubmitLeave_OracleUpdateNeeded.convo.txt' }): Line 4: #me - Hi | Line 7: #bot - Hi undefined, I am Prazna, your personal HR assistant at Emtec. I can help you with your queries. | Line 10: #bot - Hello undefined. | Line 13: #me - submit leave | Line 16: #bot - **Schedule Absence** BUTTONS(Submit,Leave Balances) PAUSE(5000) | Line 21: #me - null PAUSE(5000) FORM(startDate,10-10-2019) UI: FORM(endDate,10-10-2019) UI: FORM(leaveType,Casual Leave) UI: FORM(value,submitLeave) | Line 28: #bot - **Confirmation** BUTTONS(Yes,No) PAUSE(5000) | Line 33: #me - null BUTTON(Yes) | Line 36: #bot - Please Wait untill I submit the leave | Line 39: #bot - **Leave Application Status**
You cannot record this absence because your balance will fall below the configured minimum for this type of absence. (ANC-3405002) MEDIA(https://praznastorage.blob.core.windows.net/prazna/submitLeave.png)
2019-11-05T11:30:13.264Z botium-ScriptingProvider ReadConvosFromDirectory(.) found utterances:
 none
2019-11-05T11:30:13.264Z botium-ScriptingProvider ReadConvosFromDirectory(.) found partial convos:
 none
2019-11-05T11:30:13.264Z botium-ScriptingProvider ReadConvosFromDirectory(.) scripting memories:
 none
2019-11-05T11:30:13.264Z botium-cli-run ready reading convos (1), expanding convos ...
2019-11-05T11:30:13.264Z botium-ScriptingProvider ExpandConvos - Using utterances expansion mode: All
2019-11-05T11:30:13.265Z botium-cli-run ready expanding convos and utterances, number of test cases: (1).
2019-11-05T11:30:13.370Z botium-cli-run adding test case SubmitLeave_OracleUpdateNeeded (from: { convoDir: '.',
  filename: 'spec/convo/SubmitLeave_OracleUpdateNeeded.convo.txt' })

  Botium Test-Suite
2019-11-05T11:30:13.375Z botium-BotDriver Build - Botium Core Version: 1.6.0
2019-11-05T11:30:13.375Z botium-BotDriver Build - Capabilites: { PROJECTNAME: 'Prazna',
  TEMPDIR: 'botiumwork',
  CLEANUPTEMPDIR: true,
  WAITFORBOTTIMEOUT: 10000,
  SIMULATE_WRITING_SPEED: false,
  DOCKERCOMPOSEPATH: 'docker-compose',
  DOCKERMACHINEPATH: 'docker-machine',
  DOCKERMACHINE: false,
  DOCKERIMAGE: 'node:boron',
  DOCKERUNIQUECONTAINERNAMES: false,
  DOCKERSYSLOGPORT_RANGE: '47100-47299',
  BOT_HEALTH_STATUS: 200,
  SLACK_PUBLISHPORT_RANGE: '46100-46299',
  FACEBOOK_PUBLISHPORT_RANGE: '46300-46499',
  FACEBOOK_SEND_DELIVERY_CONFIRMATION: true,
  BOTFRAMEWORK_PUBLISHPORT_RANGE: '46500-46699',
  BOTFRAMEWORK_WEBHOOK_PORT: 3978,
  BOTFRAMEWORK_WEBHOOK_PATH: 'api/messages',
  BOTFRAMEWORK_CHANNEL_ID: 'facebook',
  SIMPLEREST_PING_RETRIES: 6,
  SIMPLEREST_PING_TIMEOUT: 10000,
  SIMPLEREST_PING_VERB: 'GET',
  SIMPLEREST_METHOD: 'GET',
  WEBSPEECH_SERVER_PORT: 46050,
  WEBSPEECH_LANGUAGE: 'en-US',
  WEBSPEECH_CLOSEBROWSER: true,
  SCRIPTING_TXT_EOL: '\n',
  SCRIPTING_XLSX_EOL_WRITE: '\r\n',
  SCRIPTING_XLSX_STARTROW: 2,
  SCRIPTING_XLSX_STARTCOL: 1,
  SCRIPTING_NORMALIZE_TEXT: true,
  SCRIPTING_ENABLE_MEMORY: false,
  SCRIPTING_ENABLE_MULTIPLE_ASSERT_ERRORS: false,
  SCRIPTING_MATCHING_MODE: 'wildcardLowerCase',
  SCRIPTING_UTTEXPANSION_MODE: 'All',
  SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
  SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
  RETRY_USERSAYS_ONERROR_REGEXP: [],
  RETRY_USERSAYS_NUMRETRIES: 1,
  RETRY_USERSAYS_FACTOR: 1,
  RETRY_USERSAYS_MINTIMEOUT: 1000,
  ASSERTERS: [],
  LOGIC_HOOKS: [],
  USER_INPUTS: [],
  CONTAINERMODE: 'directline3',
  DIRECTLINE3_SECRET: 'FLDK8rAxS7U.nv4FMjIk21PJKdfcP0OXsRm4sInZR9UsH6iajKZa72I',
  DIRECTLINE3_WEBSOCKET: true,
  DIRECTLINE3_POLLINGINTERVAL: 1000,
  DIRECTLINE3_BUTTON_TYPE: 'message',
  DIRECTLINE3_BUTTON_VALUE_FIELD: '_activity.value.val',
  DIRECTLINE3_HANDLE_ACTIVITY_TYPES: 'message',
  CONFIG: './botium.json' }
2019-11-05T11:30:13.375Z botium-BotDriver Build - Sources : { LOCALPATH: '.',
  GITPATH: 'git',
  GITBRANCH: 'master',
  GITDIR: '.' }
2019-11-05T11:30:13.376Z botium-BotDriver Build - Envs : { IS_BOTIUM_CONTAINER: true }
2019-11-05T11:30:13.520Z botium-PluginConnectorContainer Botium plugin botium-connector-directline3 loaded. Plugin version is 0.0.15
2019-11-05T11:30:13.521Z botium-connector-directline3 Validate called
2019-11-05T11:30:13.522Z botium-connector-directline3 Build called
2019-11-05T11:30:13.524Z botium-connector-directline3 Start called
2019-11-05T11:30:13.542Z botium-connector-directline3 Directline Connection Status: 1 / Connecting
2019-11-05T11:30:13.542Z botium-cli-run running testcase SubmitLeave_OracleUpdateNeeded
2019-11-05T11:30:13.545Z botium-Convo SubmitLeave_OracleUpdateNeeded/Line 4: user says {
  "sender": "me",
  "channel": null,
  "messageText": "Hi",
  "media": null,
  "buttons": null,
  "cards": null,
  "forms": null,
  "attachments": null,
  "asserters": [],
  "userInputs": [],
  "logicHooks": []
}
2019-11-05T11:30:13.546Z botium-connector-directline3 UserSays called
2019-11-05T11:30:13.546Z botium-connector-directline3 Posting activity  {
  "type": "message",
  "text": "Hi",
  "from": {
    "id": "me"
  }
}
postActivity { type: 'message', text: 'Hi', from: { id: 'me' } }
2019-11-05T11:30:15.428Z botium-connector-directline3 Directline Connection Status: 2 / Online
2019-11-05T11:30:20.033Z botium-connector-directline3 received message  {
  "type": "message",
  "id": "LTNWCiLzHl975KYEGx9iDc-c|0000000",
  "timestamp": "2019-11-05T11:30:04.5872124Z",
  "channelId": "webchat",
  "from": {
    "id": "PraznaQA",
    "name": "PraznaQA"
  },
  "conversation": {
    "id": "LTNWCiLzHl975KYEGx9iDc-c"
  },
  "text": "Hi undefined, I am Prazna, your personal HR assistant at Emtec. I can help you with your queries.",
  "inputHint": "acceptingInput",
  "replyToId": "CR578WQ6SCC"
}
2019-11-05T11:30:22.614Z botium-connector-directline3 Posted activity, assigned ID: LTNWCiLzHl975KYEGx9iDc-c|0000001
2019-11-05T11:30:22.616Z botium-Convo SubmitLeave_OracleUpdateNeeded wait for bot 'default'
2019-11-05T11:30:22.620Z botium-Convo SubmitLeave_OracleUpdateNeeded: bot says (cleaned by attachments and sourceData) {
  "sender": "bot",
  "media": [],
  "buttons": [],
  "cards": [],
  "messageText": "Hi undefined, I am Prazna, your personal HR assistant at Emtec. I can help you with your queries.",
  "channel": "default"
}
2019-11-05T11:30:22.621Z botium-ScriptingMemory fill start: {}
2019-11-05T11:30:22.622Z botium-ScriptingProvider assertBotResponse SubmitLeave_OracleUpdateNeeded/Line 7 (Line 4: #me - Hi) BOT: Hi undefined, I am Prazna, your personal HR assistant at Emtec. I can help you with your queries. = Hi undefined, I am Prazna, your personal HR assistant at Emtec. I can help you with your queries. ...
2019-11-05T11:30:22.623Z botium-Convo SubmitLeave_OracleUpdateNeeded wait for bot 'default'
2019-11-05T11:30:22.748Z botium-connector-directline3 received message  {
  "type": "message",
  "id": "LTNWCiLzHl975KYEGx9iDc-c|0000002",
  "timestamp": "2019-11-05T11:30:08.2101805Z",
  "channelId": "webchat",
  "from": {
    "id": "PraznaQA",
    "name": "PraznaQA"
  },
  "conversation": {
    "id": "LTNWCiLzHl975KYEGx9iDc-c"
  },
  "text": "Hello undefined.",
  "inputHint": "acceptingInput",
  "replyToId": "LTNWCiLzHl975KYEGx9iDc-c|0000001"
}
2019-11-05T11:30:22.750Z botium-Convo SubmitLeave_OracleUpdateNeeded: bot says (cleaned by attachments and sourceData) {
  "sender": "bot",
  "media": [],
  "buttons": [],
  "cards": [],
  "messageText": "Hello undefined.",
  "channel": "default"
}
2019-11-05T11:30:22.751Z botium-ScriptingMemory fill start: {}
2019-11-05T11:30:22.751Z botium-ScriptingProvider assertBotResponse SubmitLeave_OracleUpdateNeeded/Line 10 (Line 4: #me - Hi) BOT: Hello undefined. = Hello undefined. ...
2019-11-05T11:30:22.752Z botium-Convo SubmitLeave_OracleUpdateNeeded/Line 13: user says {
  "sender": "me",
  "channel": null,
  "messageText": "submit leave",
  "media": null,
  "buttons": null,
  "cards": null,
  "forms": null,
  "attachments": null,
  "asserters": [],
  "userInputs": [],
  "logicHooks": []
}
2019-11-05T11:30:22.752Z botium-connector-directline3 UserSays called
2019-11-05T11:30:22.752Z botium-connector-directline3 Posting activity  {
  "type": "message",
  "text": "submit leave",
  "from": {
    "id": "me"
  }
}
postActivity { type: 'message', text: 'submit leave', from: { id: 'me' } }
2019-11-05T11:30:24.158Z botium-connector-directline3 Posted activity, assigned ID: LTNWCiLzHl975KYEGx9iDc-c|0000003
2019-11-05T11:30:24.160Z botium-Convo SubmitLeave_OracleUpdateNeeded wait for bot 'default'
2019-11-05T11:30:24.744Z botium-connector-directline3 received message  {
  "type": "message",
  "id": "LTNWCiLzHl975KYEGx9iDc-c|0000004",
  "timestamp": "2019-11-05T11:30:09.7441542Z",
  "channelId": "webchat",
  "from": {
    "id": "PraznaQA",
    "name": "PraznaQA"
  },
  "conversation": {
    "id": "LTNWCiLzHl975KYEGx9iDc-c"
  },
  "text": "",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": {
        "type": "AdaptiveCard",
        "version": "1.0",
        "body": [
          {
            "type": "ColumnSet",
            "columns": [
              {
                "type": "Column",
                "width": "8",
                "items": [
                  {
                    "type": "Image",
                    "size": "small",
                    "url": "https://google-test-x.s3.amazonaws.com/noun_holidays_2517874.png",
                    "altText": "",
                    "width": "24px",
                    "height": "24px"
                  }
                ]
              },
              {
                "type": "Column",
                "width": "85",
                "items": [
                  {
                    "type": "TextBlock",
                    "text": "**Schedule Absence**"
                  }
                ],
                "verticalContentAlignment": "Center",
                "horizontalAlignment": "Left"
              }
            ],
            "horizontalAlignment": "Left"
          },
          {
            "type": "ColumnSet",
            "columns": [
              {
                "type": "Column",
                "width": "stretch",
                "items": [
                  {
                    "type": "TextBlock",
                    "text": "Start Date:*"
                  },
                  {
                    "type": "Input.Date",
                    "id": "startDate",
                    "value": ""
                  }
                ]
              },
              {
                "type": "Column",
                "width": "stretch",
                "items": [
                  {
                    "type": "TextBlock",
                    "text": "End Date:*"
                  },
                  {
                    "type": "Input.Date",
                    "id": "endDate",
                    "value": ""
                  }
                ],
                "horizontalAlignment": "Left"
              }
            ],
            "separator": true
          },
          {
            "type": "TextBlock",
            "text": "Leave Type:*"
          },
          {
            "type": "Input.ChoiceSet",
            "id": "leaveType",
            "value": "Casual Leave",
            "style": "expanded",
            "isMultiSelect": false,
            "choices": [
              {
                "title": "Casual Leave",
                "value": "Casual Leave"
              },
              {
                "title": "Earned Leave",
                "value": "Earned Leave"
              },
              {
                "title": "Floating Holiday",
                "value": "Floating Holiday"
              },
              {
                "title": "Child Care Leave",
                "value": "Child Care Leave"
              },
              {
                "title": "Community Service",
                "value": "Community Service"
              },
              {
                "title": "Bereavement Leave",
                "value": "Bereavement Leave"
              },
              {
                "title": "Relocation",
                "value": "Relocation"
              },
              {
                "title": "Unpaid Personal Leave",
                "value": "Unpaid Personal Leave"
              }
            ],
            "placeholder": "Leave Type"
          },
          {
            "type": "TextBlock",
            "text": " ",
            "separator": true
          }
        ],
        "actions": [
          {
            "type": "Action.Submit",
            "id": "submit",
            "data": {
              "val": "submitLeave"
            },
            "title": "Submit"
          },
          {
            "type": "Action.Submit",
            "id": "leaveBalances",
            "data": {
              "val": "showLeaveBalances"
            },
            "title": "Leave Balances"
          }
        ],
        "verticalContentAlignment": "Bottom"
      }
    }
  ],
  "replyToId": "LTNWCiLzHl975KYEGx9iDc-c|0000003"
}
2019-11-05T11:30:24.749Z botium-Convo SubmitLeave_OracleUpdateNeeded: bot says (cleaned by attachments and sourceData) {
  "sender": "bot",
  "media": [],
  "buttons": [],
  "cards": [
    {
      "text": [
        "**Schedule Absence**",
        "Start Date:*",
        "End Date:*",
        "Leave Type:*",
        " "
      ],
      "image": {
        "mediaUri": "https://google-test-x.s3.amazonaws.com/noun_holidays_2517874.png",
        "mimeType": "image/png",
        "altText": ""
      },
      "buttons": [
        {
          "text": "Submit",
          "payload": {
            "val": "submitLeave"
          }
        },
        {
          "text": "Leave Balances",
          "payload": {
            "val": "showLeaveBalances"
          }
        }
      ]
    }
  ],
  "messageText": "**Schedule Absence**",
  "channel": "default"
}
2019-11-05T11:30:24.750Z botium-ScriptingMemory fill start: {}
2019-11-05T11:30:24.750Z botium-ScriptingProvider assertBotResponse SubmitLeave_OracleUpdateNeeded/Line 16 (Line 13: #me - submit leave) BOT: **Schedule Absence** = **Schedule Absence** ...
2019-11-05T11:30:29.765Z botium-Convo SubmitLeave_OracleUpdateNeeded/Line 21: user says {
  "sender": "me",
  "channel": null,
  "messageText": null,
  "media": null,
  "buttons": null,
  "cards": null,
  "forms": [
    {
      "name": "startDate",
      "value": "10-10-2019"
    },
    {
      "name": "endDate",
      "value": "10-10-2019"
    },
    {
      "name": "leaveType",
      "value": "Casual Leave"
    },
    {
      "name": "value",
      "value": "submitLeave"
    }
  ],
  "attachments": null,
  "asserters": [],
  "userInputs": [
    {
      "name": "FORM",
      "args": [
        "startDate",
        "10-10-2019"
      ]
    },
    {
      "name": "FORM",
      "args": [
        "endDate",
        "10-10-2019"
      ]
    },
    {
      "name": "FORM",
      "args": [
        "leaveType",
        "Casual Leave"
      ]
    },
    {
      "name": "FORM",
      "args": [
        "value",
        "submitLeave"
      ]
    }
  ],
  "logicHooks": [
    {
      "name": "PAUSE",
      "args": [
        "5000"
      ]
    }
  ]
}
2019-11-05T11:30:29.765Z botium-connector-directline3 UserSays called
2019-11-05T11:30:29.765Z botium-connector-directline3 Posting activity  {
  "type": "message",
  "text": null,
  "from": {
    "id": "me"
  },
  "value": {
    "startDate": "10-10-2019",
    "endDate": "10-10-2019",
    "leaveType": "Casual Leave",
    "value": "submitLeave"
  }
}
postActivity { type: 'message',
  text: null,
  from: { id: 'me' },
  value:
   { startDate: '10-10-2019',
     endDate: '10-10-2019',
     leaveType: 'Casual Leave',
     value: 'submitLeave' } }
2019-11-05T11:30:31.209Z botium-connector-directline3 Posted activity, assigned ID: LTNWCiLzHl975KYEGx9iDc-c|0000005
2019-11-05T11:30:36.213Z botium-Convo SubmitLeave_OracleUpdateNeeded wait for bot 'default'
2019-11-05T11:30:46.218Z botium-BaseContainer WaitBotSays error Error: Queue.pop timeout after 10000
    at timeoutRequest (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\helpers\Queue.js:46:18)
    at Timeout.timeoutCallback [as _onTimeout] (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:4176:17)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
2019-11-05T11:30:46.218Z botium-Convo SubmitLeave_OracleUpdateNeeded: bot says (cleaned by attachments and sourceData) {}
2019-11-05T11:30:46.219Z botium-Convo BotiumError: SubmitLeave_OracleUpdateNeeded/Line 28: bot says nothing
    at scriptingEvents.onBotStart.then.then (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:340:33)
2019-11-05T11:30:46.223Z botium-cli-run SubmitLeave_OracleUpdateNeeded failed: { TranscriptError: SubmitLeave_OracleUpdateNeeded/Line 28: bot says nothing
    at async.waterfall (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:227:25)
    at wrapper (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:272:20)
    at next (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:4584:24)
    at C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:325:20
    at runConversation (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:205:15)
    at async.mapSeries (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:442:9)
    at err (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:252:13)
    at wrapper (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:272:20)
    at iterateeCallback (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:417:21)
    at C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:325:20
    at _iteratee (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:249:17)
    at convoStepDone (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:272:11)
    at scriptingEvents.onBotStart.then.then (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:346:24)
  name: 'TranscriptError',
  transcript:
   Transcript {
     steps:
      [ [TranscriptStep],
        [TranscriptStep],
        [TranscriptStep],
        [TranscriptStep],
        [TranscriptStep],
        [TranscriptStep],
        [TranscriptStep] ],
     scriptingMemory: {},
     convoBegin: 2019-11-05T11:30:13.544Z,
     convoEnd: 2019-11-05T11:30:46.219Z,
     err:
      { BotiumError: SubmitLeave_OracleUpdateNeeded/Line 28: bot says nothing
          at scriptingEvents.onBotStart.then.then (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:340:33) name: 'BotiumError', context: [Object] } },
  cause:
   { BotiumError: SubmitLeave_OracleUpdateNeeded/Line 28: bot says nothing
       at scriptingEvents.onBotStart.then.then (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:340:33)
     name: 'BotiumError',
     context:
      { message: 'SubmitLeave_OracleUpdateNeeded/Line 28: bot says nothing' } } }
    1) SubmitLeave_OracleUpdateNeeded
2019-11-05T11:30:46.230Z botium-connector-directline3 Stop called
2019-11-05T11:30:46.230Z botium-connector-directline3 unsubscribing from directline activity subscription
2019-11-05T11:30:46.231Z botium-connector-directline3 unsubscribing from directline connectionstatus subscription
2019-11-05T11:30:46.231Z botium-connector-directline3 ending directline connection
2019-11-05T11:30:46.232Z botium-connector-directline3 Clean called
2019-11-05T11:30:46.234Z botium-BaseContainer Cleanup rimrafing temp dir C:\Users\..\Documents\....botium-connector-directline3\botiumwork\Prazna-20191105-170013-k5nSb

  0 passing (33s)
  1 failing

  1) Botium Test-Suite
       SubmitLeave_OracleUpdateNeeded:
     TranscriptError: SubmitLeave_OracleUpdateNeeded/Line 28: bot says nothing
      at async.waterfall (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:227:25)
      at wrapper (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:272:20)
      at next (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:4584:24)
      at C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:325:20
      at runConversation (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:205:15)
      at async.mapSeries (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:442:9)
      at err (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:252:13)
      at wrapper (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:272:20)
      at iterateeCallback (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:417:21)
      at C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:325:20
      at _iteratee (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\async\dist\async.js:249:17)
      at convoStepDone (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:272:11)
      at scriptingEvents.onBotStart.then.then (C:\Users\..\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-core\src\scripting\Convo.js:346:24)
codeforequity-at commented 5 years ago

this is what the activity looks like:

{ type: 'message',
  text: null,
  from: { id: 'me' },
  value:
   { startDate: '10-10-2019',
     endDate: '10-10-2019',
     leaveType: 'Casual Leave',
     value: 'submitLeave' } }

which is the outcome of using the FORM tag in the convo file

FORM value|submitLeave

Reading one of your previous posts, this should actually look like this:

FORM val|Submit
DipaliK9 commented 5 years ago

We have made few changes in our json now the correct value is FORM value|submitLeave and I am using the same in convo file.

codeforequity-at commented 4 years ago

So, if the activity format is correct, I don't see what Botium can do more - does your Bot Framework service receive anything sent from Botium ?

With the latest Botium builds, there is a new capability available for Directline to configure a template for an activity (https://github.com/codeforequity-at/botium-connector-directline3#directline3_activity_template), in case you require additional fields to be set.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.