Firstly, I'm very sorry that I cannot let this site open for you guys to test it because this site required username and password.
I'm trying to crawl each question tab, then click answer buttons A, B, C, D and scrape explanation text in each answer. But this site is very different to others, and I'm just a beginner.
I'm stuck for 2 days, and really need your helps :(
Hope you take a look on this site and please help me. If you need any information please tell me i will add them here. Many many thanks!!!!
Sitemap:
{"_id":"cia","startUrl":["https://www.gleim.com/testprep/cia/2019/part2?action=study"],"selectors":[{"id":"Solution","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div#mainContent","multiple":false,"delay":"0","clickElementSelector":"label.actualFoil","clickType":"clickOnce","discardInitialElements":true,"clickElementUniquenessType":"uniqueText"},{"id":"Explanation","type":"SelectorText","parentSelectors":["Solution"],"selector":"td.answer-explanation","multiple":true,"regex":"","delay":0},{"id":"next","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div#mainContent","multiple":true,"delay":"0","clickElementSelector":"a.goTo span.questionSource","clickType":"clickOnce","discardInitialElements":true,"clickElementUniquenessType":"uniqueText"},{"id":"Title","type":"SelectorText","parentSelectors":["next"],"selector":"div.question-source","multiple":false,"regex":"","delay":0},{"id":"Number","type":"SelectorText","parentSelectors":["next"],"selector":"span.mcqQuestionNum","multiple":false,"regex":"","delay":0},{"id":"Question","type":"SelectorText","parentSelectors":["next"],"selector":"td#highlightable","multiple":false,"regex":"","delay":0},{"id":"Answer_A","type":"SelectorText","parentSelectors":["next"],"selector":"tr.questionSpacing:contains('A.') td:nth-of-type(2) label.actualFoil","multiple":false,"regex":"","delay":0},{"id":"Answer_B","type":"SelectorText","parentSelectors":["next"],"selector":"tr.questionSpacing:contains('B.') td:nth-of-type(2) label.actualFoil","multiple":false,"regex":"","delay":0},{"id":"Answer_C","type":"SelectorText","parentSelectors":["next"],"selector":"tr.questionSpacing:contains('C.') td:nth-of-type(2) label.actualFoil","multiple":false,"regex":"","delay":0},{"id":"Answer_D","type":"SelectorText","parentSelectors":["next"],"selector":"tr.questionSpacing:contains('D.') td:nth-of-type(2) label.actualFoil","multiple":false,"regex":"","delay":0},{"id":"Fact_Pattern","type":"SelectorText","parentSelectors":["next"],"selector":"td#fact-pattern","multiple":false,"regex":"","delay":0}]}
I'm having two ID selectors, frist is 'Solution' which select each button answer A, B, C, D then scrape each answer text. Second is 'Next' which crawl all tab question on the table in the right and scrape text data like title, questions, answers....
I tried to put 'Solution' into 'Next' (click element inside a click element) put it doesn't work. But magically i put 'Solution' in /root then 'Solution' work perfectly in each question tab.




