Cycle through dropdown menu options not visible upon page load

Hello everyone
I saw lots of examples on how to handle dropdowns among the "how to videos" and here in this forum. Unfortunately none show how to handle dropdowns that get loaded asynchronously upon click. (the menu items are basically not in the DOM until the user clicks on the menu link).

    Show months   ----> dropdown link
          |
          | Jan
          | Feb
          | Mar    ---> All the options to cycle through
          | Apr
          | ...

I came up with the following sitemap but I was wondering why it does not cycle through all the months and it stops after the 1st pass. I guess there's something off around open menu and cycle each month transactions but I can't figure out what's wrong

Any tip?

{
   "_id":"wip",
   "startUrl":[
      "https://app/accounts"
   ],
   "selectors":[
      {
         "id":"each account",
         "type":"SelectorElementClick",
         "parentSelectors":[
            "_root"
         ],
         "selector":"body",
         "multiple":true,
         "delay":2000,
         "clickElementSelector":"div[data-testid*='accounts'] a",
         "clickType":"clickOnce",
         "discardInitialElements":"do-not-discard",
         "clickElementUniquenessType":"uniqueHTMLText"
      },
      {
         "id":"open menu",
         "type":"SelectorElementClick",
         "parentSelectors":[
            "each account"
         ],
         "selector":"body",
         "multiple":true,
         "delay":2000,
         "clickElementSelector":"span[data-testid=\"transactions-list-filter-date-label\"]",
         "clickType":"clickOnce",
         "discardInitialElements":"discard",
         "clickElementUniquenessType":"uniqueText"
      },
      {
         "id":"cycle each month transactions",
         "type":"SelectorElementClick",
         "parentSelectors":[
            "each account"
         ],
         "selector":"div[role='transactions-group']",
         "multiple":true,
         "delay":2000,
         "clickElementSelector":"div[role=\"listbox\"] div[role=\"option\"]",
         "clickType":"clickOnce",
         "discardInitialElements":"discard-when-click-element-exists",
         "clickElementUniquenessType":"uniqueHTMLText"
      },
      {
         "id":"date",
         "type":"SelectorText",
         "parentSelectors":[
            "each month transactions"
         ],
         "selector":".ZijzU div",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {
         "id":"transaction",
         "type":"SelectorElement",
         "parentSelectors":[
            "each month transactions"
         ],
         "selector":"div.LegacyCard-sc-14t52mh-0",
         "multiple":true,
         "delay":0
      },
      {
         "id":"description",
         "type":"SelectorText",
         "parentSelectors":[
            "transaction"
         ],
         "selector":"div[data-testid=\"payment-card-title\"]",
         "multiple":false,
         "regex":"",
         "delay":0
      },
      {
         "id":"amount",
         "type":"SelectorText",
         "parentSelectors":[
            "transaction"
         ],
         "selector":"div[data-testid=\"payment-card-amount\"] span",
         "multiple":false,
         "regex":"",
         "delay":0
      }
   ]
}
1 Like