My bot response contains text and hyperlink in single message. I am using botium-connector-webdriverio to verify bot responses in my website. In this connector capability , it is define that I can use BUTTONS to verify link, But I am unable to verify it. Could you please help. please find bot element in website here
botium.json,
defined below capability for hyperlink "WEBDRIVERIO_OUTPUT_ELEMENT_BUTTONS":"//div[contains(@class,'msg-left')]/a",
in convo file, I have defined below expected response
#bot BUTTONS https://***/mobile-app-development/chatbot-platform
Getting below error Error: hello/Line 12: assertion error - Error: Line 12: Expected buttons with text "https://---/mobile-app-development/chatbot-platform" at ButtonsAsserter.assertConvoStep (F:\Bot_Training_Automation\Website\node_modules\botium-core\src\scripting\logichook\asserter\ButtonsAsserter.js:19:61) at p (F:\Bot_Training_Automation\Website\node_modules\botium-core\src\scripting\ScriptingProvider.js:111:61) at Promise (F:\Bot_Training_Automation\Website\node_modules\botium-core\src\scripting\ScriptingProvider.js:17:13) at new Promise () at p (F:\Bot_Training_Automation\Website\node_modules\botium-core\src\scripting\ScriptingProvider.js:15:19) at asserters.filter.map.a (F:\Bot_Training_Automation\Website\node_modules\botium-core\src\scripting\ScriptingProvider.js:111:17) at Array.map () at ScriptingProvider._createAsserterPromises (F:\Bot_Training_Automation\Website\node_modules\botium-core\src\scripting\ScriptingProvider.js:111:8) at ScriptingProvider.assertConvoStep (F:\Bot_Training_Automation\Website\node_modules\botium-core\src\scripting\ScriptingProvider.js:61:21) at scriptingEvents.onBotStart.then.then (F:\Bot_Training_Automation\Website\node_modules\botium-core\src\scripting\Convo.js:345:36) at process._tickCallback (internal/process/next_tick.js:68:7)
Botium can check for the existance of hyperlinks in the text response. In your case, I assume you want to verify the Hyperlink behind the Button.
The first thing to do is to tell Botium the Selenium selector for a Button. This is done with the WEBDRIVERIO_OUTPUT_ELEMENT_BUTTONS capability - you already did that.
Second, you have to tell Botium what other Media are attached by using the WEBDRIVERIO_OUTPUT_ELEMENT_MEDIA capability.
For Buttons, Botium will select the Text only, not the hyperlink (if it has a hyperlink at all). This is something I just added to our Botium backlog, as I consider this a missing feature.
You can then use the BUTTONS and MEDIA asserters for verifying the existance of buttons and media files in the chatbot response.
For verifying the existance of a hyperlink in the chatbot response, there is the Hyperlink Existance Asserter - it is preconfigured in Botium Box, but you can use it with Botium Bindings and Botium CLI as well.
The Botium Platform additionaly delivers a Hyperlink Response Asserter.