I need to get JSON data from console, which can be seen in this image.
So far I have used the following codes:
j = driver.execute_script(" return document.getElementsByClassName('form-group text required assessment_questions_choices_text')")
I tried to save the data to a list, that didn't work as well.
list = []
list = driver.execute_script(" return document.getElementsByClassName('form-group text required assessment_questions_choices_text')")
Also, I came across a method online which can be found here, using it I am able to get only the index of the data to an external file.
{ "0": {}, "1": {}, "2": {}, "3": {}, "4": {} }
Looking for a way to import all data, with each attribute directly to my python code.
Thanks in advance.