Recursive downloading flashcards

Hi I'm new to web scraping. I'm trying to download a copy of flashcards to turn into an excel sheet to study from. The website doesnt have the cards paginated, and you have to click through a few prompts to get to the deck. I have done that below with select, select-all, and review-all. This takes me to a page where the "question" comes up, you click "show answer" for the answer to come up, and then you click a prompt on whether or not you "know" the answer. I can get the first question and answer, but when the next card comes up, the code quits on me. I'm not sure how I can make it run through the last 4 commands - show answer, question, answer, and know - repeat over and over again until the end of the deck. Any help would be greatly appreciated.

Sitemap:
{"_id":"biostats","startUrl":["https://flashcardwebsite.com"],"selectors":[{"id":"select","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"#ember1693 div.input-toggle--wrapper, #ember1693 div.input-toggle--switch","multiple":false,"delay":"1500","clickElementSelector":"#ember1693 div.input-toggle--switch","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"},{"id":"select-all","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"a[data-ember-action='1699']","multiple":false,"delay":"1500","clickElementSelector":"a[data-ember-action='1699']","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"},{"id":"review-all","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"button.button-primary","multiple":false,"delay":"8500","clickElementSelector":"button.button-primary","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"},{"id":"question","type":"SelectorText","parentSelectors":["_root"],"selector":".katexHtml div","multiple":true,"regex":"","delay":0},{"id":"showanswer","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.button-primary","multiple":false,"delay":"3000","clickElementSelector":"div.button-primary","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"},{"id":"answer","type":"SelectorText","parentSelectors":["_root"],"selector":"div.annotate-answer","multiple":true,"regex":"","delay":0},{"id":"know","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.recall-button-1","multiple":false,"delay":"2000","clickElementSelector":"div.recall-button-1","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"}]}