I am using “E2E UI/UX Testing” connector with automation technology “Selenium”. In my project we have condition to perform some action on input data after connecting to bot. Can we add Javascript Hook and perform task in between after connecting to chat bot.
When we successfully connect to chatbot and able to start conversation. In between of conversation we have a situation of changing an option say mobile number, for that we need to select one element from chatbot and open a dialog box which needs to be handled. This dialog box have a text area and submit button that need to handle as well. For all this we are looking for javascript hook to handle element after chatbot connection.
In the botium Box, Settings → FileBrowser options don’t see a folder for resources or src and there is no option provided to create any new folders, can you please help on how we can have this fixed?
As a alternative tried to add the Javascript hook functions in the botium.json as below,
“LOGIC_HOOKS”: [
{
“ref”: “DUMMYHOOK”,
“src”: {
“onConvoBegin”: “const browser = container.pluginInstance.browser; const topBtn = await browser.$(‘#top_window’);//Exception is thrown while trying to find the component. console.log(await topBtn.getText());//just print or update the value here”,
},
“global”: false
}
]
Comments in Javascript is provided for explanation purpose only, and is not part of the botium.json file.
When I try to search the HTML tag it always results in “Running Convo “Sample1TC” failed: Sample1TC/Line 3: assertion error - Unexpected identifier”.
File browser is only accessible for users having the permission FILESYSTEM_WRITE - by default Botium Box role management only assigned this permission to the Administrator role.