Need Help getting Table Extraction list To an Array

Hi, In Table Extraction I have List Of +500 Questions, for each question i need to click on the right answer on page. i think i need to put this question on array and use switch for this so check element if its equal to “how are you” on the array then click “good” , what is the easy way to do it? as i said its over +500 question and im new, thank you !

If you add a screenshot of the page, it may be easier to understand :slightly_smiling_face:


and its over 500 question so i need best way to solve it. if-else if for example will be bad for my case.
Thank you for reply.

Hi,

How about the following approach?

First, Create Dictionary which has key as Question and value as Answer (Probably it’s better to create from excel sheet (DataTable))

 dict = New Dictionary(Of String,String)From{{"How are you","Good"},{"QuestionB","AnswerB"}}

Then loop the questions and get each question string and answer string for it from the dictionary

strQuestion = CurrentRows("Question").ToString

strAnswer = dict(strQuestion)

Next Click element which has the above strAnswer as InnerText attribute of selector

Regards,

@FUN_1

Welcome to the community

If answer to every question is already known then create a excel with questions and related answer…get them into daattable

Then filter the datatable based on question and pass the answer to selector and click

<webctrl tag='DIV' innertext='{{answerVariable}}' />

If you dont know the answers…then try leveraging openai connector…send the question and options to openai connector and based on response send the answer again to the same selector to click

Hoep this helps

Cheers