Extraction Of Chatbot Conversation

How to extract data from a Chatbot conversation?

Requirement: Extraction of text from a Chatbot application as seen below,



Resolution Steps:

Approach #1: If Case selectors are not exposed or present, the data can be extracted using
  • Screen Scraping - More details at Output Or Screen Scraping Methods. With a chatbot automation, challenge lies in understanding the exact text that is being extracted, if the location text in the chatbot is not constant. However, if text remains in the same region, it is possible to retrieve.
  • Computer Vision to extract content in the absence of selectors.


Approach #2: If the data is clustered , then the below approach can be tried -
If the extracted text is clustered as a single entity, this could be due to the text being clubbed together on the data layer and might need further string manipulation to get the text out.

String manipulation can be used to access exact string values, such as string starting with a particular text, or ending with a particular text, or finding the nth value in a string and so on.
This approach will be more suited for extracting values, which will have known standard starting, or ending values, or exact position of the text. It allows to split a long sentence into strings and then access the individual strings, such as the first word, 4th word, etc.
Forum page, explaining the individual functions under string, how to use them and XAML files is found at How To Manipulate A Part Of String Split Trim Substring Replace Remove Left Right .



Approach #3: The selectors if are identical, with the idx value increasing incrementally, then an Incremental variable can be used in the place of idx, by iterating through the Chatbot conversation.


Approach #4: APIs (if available) can be utilized, so that the APIs can give a direct interaction approach.