[Chatbot Whatsapp] How to connect botium to whatsapp chatbot

I need help.

How to connect botium to whatsapp chatbot? previously I’ve read on How to Automate Testing of Your WhatsApp Chatbot | by Florian Treml | Chatbots Life but for me it’s not very clear.

when I connect the device an error like this appears

thank you

For testing Whatsapp with Botium Box, you need a device cloud provider account or you setup your own device emulator or Appium server.

I have prepared an appium server on local, but it seems that there is still a config that is lacking in botium, I will share it, please correct me if there is an incorrect config, sir.

when I try to connect to the device the error message always appears, is there a missing configuration?Thank you

will try it and come back to you

this Log detail sir,

liveChatStartBot(d83a6d90-47a0-11ec-9ab7-9d2cdfe66c22) building container
2021-11-17T12:21:10.943Z botium-core-BotDriver Loaded Botium configuration files /app/server/botium.json
2021-11-17T12:21:10.946Z botium-core-BotDriver Build - Botium Core Version: 1.11.15
2021-11-17T12:21:10.950Z botium-core-BotDriver Build - Capabilites: {
PROJECTNAME: ‘Botium Project’,
TESTSESSIONNAME: ‘Botium Test Session’,
TESTCASENAME: ‘Botium Test Case’,
TEMPDIR: ‘/app/server/storage/botiumwork’,
CLEANUPTEMPDIR: true,
WAITFORBOTTIMEOUT: 10000,
SIMULATE_WRITING_SPEED: false,
SIMPLEREST_PING_RETRIES: 6,
SIMPLEREST_PING_TIMEOUT: 10000,
SIMPLEREST_PING_VERB: ‘GET’,
SIMPLEREST_PING_UPDATE_CONTEXT: true,
SIMPLEREST_PING_PROCESS_RESPONSE: false,
SIMPLEREST_INIT_PROCESS_RESPONSE: false,
SIMPLEREST_STOP_RETRIES: 6,
SIMPLEREST_STOP_TIMEOUT: 10000,
SIMPLEREST_STOP_VERB: ‘GET’,
SIMPLEREST_START_RETRIES: 6,
SIMPLEREST_START_TIMEOUT: 10000,
SIMPLEREST_START_UPDATE_CONTEXT: true,
SIMPLEREST_START_PROCESS_RESPONSE: true,
SIMPLEREST_START_VERB: ‘GET’,
SIMPLEREST_POLL_VERB: ‘GET’,
SIMPLEREST_POLL_INTERVAL: 1000,
SIMPLEREST_POLL_UPDATE_CONTEXT: true,
SIMPLEREST_METHOD: ‘GET’,
SIMPLEREST_IGNORE_EMPTY: true,
SIMPLEREST_TIMEOUT: 10000,
SIMPLEREST_EXTRA_OPTIONS: {},
SIMPLEREST_STRICT_SSL: true,
SIMPLEREST_INBOUND_UPDATE_CONTEXT: true,
SIMPLEREST_CONTEXT_MERGE_OR_REPLACE: ‘MERGE’,
SCRIPTING_TXT_EOL: ‘\n’,
SCRIPTING_XLSX_EOL_WRITE: ‘\r\n’,
SCRIPTING_XLSX_HASHEADERS: true,
SCRIPTING_CSV_SKIP_HEADER: true,
SCRIPTING_CSV_QUOTE: ‘"’,
SCRIPTING_CSV_ESCAPE: ‘"’,
SCRIPTING_NORMALIZE_TEXT: true,
SCRIPTING_ENABLE_MEMORY: false,
SCRIPTING_ENABLE_MULTIPLE_ASSERT_ERRORS: true,
SCRIPTING_MATCHING_MODE: ‘wildcardIgnoreCase’,
SCRIPTING_UTTEXPANSION_MODE: ‘all’,
SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
SCRIPTING_UTTEXPANSION_NAMING_MODE: ‘justLineTag’,
SCRIPTING_UTTEXPANSION_NAMING_UTTERANCE_MAX: ‘16’,
SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
SCRIPTING_FORCE_BOT_CONSUMED: false,
ASSERTERS: [],
LOGIC_HOOKS: [],
USER_INPUTS: [],
SECURITY_ALLOW_UNSAFE: false,
CONTAINERMODE: ‘webdriverio’,
WEBDRIVERIO_SCREENSHOTS: ‘none’,
WEBDRIVERIO_OUTPUT_ELEMENT_DEBUG_HTML: false,
WEBDRIVERIO_APP: ‘’,
WEBDRIVERIO_APPPACKAGE: ‘com.whatsapp’,
WEBDRIVERIO_APPACTIVITY: ‘com.whatsapp.Main’,
WEBDRIVERIO_APPNORESET: false,
WEBDRIVERIO_USE_APPIUM_PREFIX: ‘appium:’,
WEBDRIVERIO_PROFILE: ‘’,
WEBDRIVERIO_OPENBOT: ‘’,
WEBDRIVERIO_OUTPUT_ELEMENT_HASH: ‘INDEX’,
WEBDRIVERIO_OUTPUT_ELEMENT_HASH_ATTRIBUTE: null,
WEBDRIVERIO_OUTPUT_ELEMENT_HASH_SELECTOR: null,
WEBDRIVERIO_INPUT_NAVIGATION_BUTTONS: ‘’,
WEBDRIVERIO_OPENBOTPAUSE: null,
WEBDRIVERIO_INPUTPAUSE: null,
WEBDRIVERIO_INPUT_ELEMENT: ‘//[@resource-id=“com.hariofspades.chatbot:id/et_message”]’,
WEBDRIVERIO_INPUT_ELEMENT_VISIBLE_TIMEOUT: 10000,
WEBDRIVERIO_INPUT_ELEMENT_SENDBUTTON: '//
[@resource-id=“com.hariofspades.chatbot:id/btn_send”]’,
WEBDRIVERIO_OUTPUT_ELEMENT: ‘//[@resource-id=“com.hariofspades.chatbot:id/chatMessageView” and name(./[1])=“android.widget.ImageView”]’,
WEBDRIVERIO_OUTPUT_ELEMENT_BUTTONS: ‘’,
WEBDRIVERIO_OUTPUT_ELEMENT_BUTTONS_NESTED: true,
WEBDRIVERIO_OUTPUT_ELEMENT_TEXT: ‘.//*[@resource-id=“com.hariofspades.chatbot:id/text”]’,
WEBDRIVERIO_OUTPUT_ELEMENT_CARD: ‘’,
WEBDRIVERIO_OUTPUT_ELEMENT_CARD_KEY_ATTRIBUTE: ‘’,
WEBDRIVERIO_OUTPUT_ELEMENT_CARD_TEXT: ‘’,
WEBDRIVERIO_OUTPUT_ELEMENT_CARD_SUBTEXT: ‘’,
WEBDRIVERIO_OUTPUT_ELEMENT_CARD_MEDIA: ‘’,
WEBDRIVERIO_OUTPUT_ELEMENT_CARD_BUTTONS: ‘’,
WEBDRIVERIO_IGNOREUPFRONTMESSAGES: true,
WEBDRIVERIO_IGNOREWELCOMEMESSAGES: 0,
WEBDRIVERIO_ADDITIONAL_CAPABILITIES: {},
WEBDRIVERIO_CONTACT: ‘’,
WEBDRIVERIO_LANGUAGE: ‘’,
SIMPLEREST_INBOUND_REDISURL: {
sentinels: [ [Object] ],
sentinelPassword: ‘2Pk94d2vgXczG5G2’,
password: ‘2Pk94d2vgXczG5G2’,
name: ‘mymaster’
},
SIMPLEREST_REDIS_TOPIC: ‘mini_SIMPLEREST_INBOUND_SUBSCRIPTION_PROD_SIMPLEREST_INBOUND_SUBSCRIPTION’,
TWILIO_IVR_REDISURL: {
sentinels: [ [Object] ],
sentinelPassword: ‘2Pk94d2vgXczG5G2’,
password: ‘2Pk94d2vgXczG5G2’,
name: ‘mymaster’
},
TWILIO_IVR_REDIS_TOPICBASE: ‘mini_SIMPLEREST_INBOUND_SUBSCRIPTION_PROD_TWILIO_IVR’,
TWILIO_SMS_REDISURL: {
sentinels: [ [Object] ],
sentinelPassword: ‘2Pk94d2vgXczG5G2’,
password: ‘2Pk94d2vgXczG5G2’,
name: ‘mymaster’
},
TWILIO_SMS_REDIS_TOPICBASE: ‘mini_SIMPLEREST_INBOUND_SUBSCRIPTION_PROD_TWILIO_SMS’,
WEBDRIVERIO_OPTIONS: {
capabilities: { path: ‘/wd/hub’, port: 4723, capabilities: [Object] },
protocol: ‘https’,
hostname: ‘6302-36-72-233-244.ngrok.io’,
path: ‘’,
queryParams: {},
port: 443
}
}
2021-11-17T12:21:10.950Z botium-core-BotDriver Build - Sources : { LOCALPATH: ‘.’, GITPATH: ‘git’, GITBRANCH: ‘master’, GITDIR: ‘.’ }
2021-11-17T12:21:10.950Z botium-core-BotDriver Build - Envs : { IS_BOTIUM_CONTAINER: true }
2021-11-17T12:21:11.453Z botium-connector-PluginConnectorContainer-helper Botium plugin botium-connector-webdriverio loaded. Plugin version is 0.3.18
2021-11-17T12:21:11.454Z botium-connector-webdriverio Validate called
2021-11-17T12:21:11.457Z botium-connector-webdriverio Build called
liveChatStartBot(d83a6d90-47a0-11ec-9ab7-9d2cdfe66c22) container built, now starting
2021-11-17T12:21:11.459Z botium-connector-webdriverio Start called
2021-11-17T12:21:11.459Z botium-connector-webdriverio Webdriver Options: {“capabilities”:{“path”:"/wd/hub",“port”:4723,“capabilities”:{“platformName”:“Android”,“platformVersion”:“11.0”,“deviceName”:“Pixel 2 API 30”,“appPackage”:“com.whatsapp”,“appActivity”:“com.whatsapp.Main”,“automationName”:“UiAutomator2”},“appium:appPackage”:“com.whatsapp”,“appium:appActivity”:“com.whatsapp.Main”,“appium:noReset”:false,“appium:autoGrantPermissions”:true,“appium:automationName”:“UiAutomator2”},“protocol”:“https”,“hostname”:“6302-36-72-233-244.ngrok.io”,“path”:"",“queryParams”:{},“port”:443,“logLevel”:“silent”}
2021-11-17T12:21:11.462Z botium-connector-webdriverio WebDriver error on startup: Type check for option “path” failed: The option “path” needs to start with a “/”
2021-11-17T12:21:11.463Z botium-connector-webdriverio Stop called
2021-11-17T12:21:11.464Z botium-connector-webdriverio Clean called
2021-11-17T12:21:11.464Z botium-connector-BaseContainer Cleanup rimrafing temp dir /app/server/storage/botiumwork/Botium Project 20211117 122110 oxexc
WebDriver error on startup: Type check for option “path” failed: The option “path” needs to start with a “/”

Can you try to let your Selenium/Appium Endpoint in the Device Provider configuration end in “/”

like this sir ?

still error

if i ping already connected

In the device set, the capabilities from the screenshot above look strange. should be simply something like this:

image

And in the Selenium/Appium Endpoint, I think this should end in /wd/hub

ok work and what teh next sir ?

it’s working sir, now how do you prevent the app from being reset when connecting to a device?

problem solved. Thanks

1 Like

Would be awesome if you write some kind of instruction show you made this work. The mentioned blog article maybe doesnt cover all the things you found out.

1 Like