Please help. I've spent hours and hours trying to figure out why this won't work.
I'm struggling to figure out how to do pagination with dynamic popups. I have two problems with the following sitemap. There's a total of five pages at this url. Each page loads 10 items. Each item has a button that opens a dynamic popup. The sitemap is supposed to click each of the buttons in turn, grab the data from the popup, close the popup, then open the next popup. After reaching the end of the page, it then is supposed to go to the next page and start over, continuing this until there are no more pages. When I tell it to scrape, it seemingly does this. I can sit here and watch it open all of the popups from each page. However, there are two issues:
First, the first page only opens the first dynamic popup. After opening the first popup on the list of page "1", it doesn't open the next popup, it just skips to page "2". It then starts opening the popups on the new page just like its supposed to. It runs perfectly from there, clicking the link to open each of the 10 popups on page "2" then going to page "3" and opening each of the ten there and so on on each subsequent page until the end. Why does it only open the one popup on page "1" instead of all 10 like it does on the rest of the pages?
Second (and this is the bigger issue), after it runs through the entire scrape, there's no data saved. I don't understand it at all. It seems to work perfectly, but there's just no data when it's done.
Url: https://locator.lcms.org/church?range=0&state=WYOMING&search=WYOMING&s=y
Sitemap:
{"_id":"lcms-wyoming","startUrl":["https://locator.lcms.org/church?range=0&state=WYOMING&search=WYOMING&s=y"],"selectors":[{"id":"pagination","parentSelectors":["_root","pagination"],"paginationType":"auto","selector":"a.ui-paginator-page","type":"SelectorPagination"},{"id":"element-card","parentSelectors":["pagination"],"type":"SelectorElement","selector":"app-card td","multiple":true},{"id":"Church-Name","parentSelectors":["element-card"],"type":"SelectorText","selector":"dt","multiple":false,"regex":""},{"id":"profile-link","parentSelectors":["element-card"],"type":"SelectorPopupLink","selector":"div.btn","multiple":false},{"id":"Church-mailining-address","parentSelectors":["profile-link"],"type":"SelectorText","selector":".ui-tabview-panel dt:contains('Mailing Address') + dd","multiple":false,"regex":""},{"id":"church-email","parentSelectors":["profile-link"],"type":"SelectorText","selector":".ui-tabview-panel a.single-contact","multiple":false,"regex":""}]}