Lost in the sauce

I am trying to collect the names, phone numbers, emails, and whatsapp numbers of these businesses on this latin american yellow pages website
The difficulty I'm having is that the phone number and emails are behind a button with some pretty intense looking div stuff and im not sure if im just not adding [ ]'s in the right places or just doing the wrong thing entirely.

if someone wants to just get all that for me that would be much appreciated, im down to learn tho.
so far ive set up clicking the individual business page and to click the phone button. i went into that element click and added a text action and set it to the selector of the parent action. i can only seem to get it to output "phone" instead of a phone number so i suspect im using the wrong element somewhere but it seems to be the parent.
im thinking i need to set up a second click action under the first that selects the new (?) parent (?) that actually holds the phone number and then a text action under that one that selects the phone number.
the thing that has the number in it is

<span class="w-3/5 font-semibold ng-star-inserted"> (809) 565-5797 </span>

i cant get it to show up as a number because i dont know css

{"_id":"paginasamarillas-com-do-2026-02-08","startUrl":["https://paginasamarillas.com.do/en/business/search/republica-dominicana/c/ferreterias?p=1&sort=alpha"],"selectors":[{"id":"businessselect","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":".yp-result-card-external-information a[data-component]","type":"SelectorLink","version":2},{"clickActionType":"real","clickElementSelector":"li div button.flex","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard-when-click-element-exists","id":"clickbutton","multiple":true,"parentSelectors":["businessselect"],"selector":"div.col-start-3","type":"SelectorElementClick"}]}

update // got a good start to my day and got to work on figuring this out. i can now get the phone number and email consistently, the whatsapps are a link so that what im trying to figure out now

{"_id":"paginasamarillas-com-do-2026-02-08","startUrl":["https://paginasamarillas.com.do/en/business/search/republica-dominicana/c/ferreterias?p=1&sort=alpha"],"selectors":[{"id":"businessselect","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":".yp-result-card-external-information a[data-component]","type":"SelectorLink","version":2},{"clickActionType":"real","clickElementSelector":"li .relative button[data-component='telephone']","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard","id":"phoneclick","multiple":false,"parentSelectors":["businessselect"],"selector":"div.col-start-3","type":"SelectorElementClick"},{"id":"phone number","multiple":false,"multipleType":"singleColumn","parentSelectors":["phoneclick"],"regex":"","selector":"span.font-semibold","type":"SelectorText","version":2},{"clickActionType":"real","clickElementSelector":"button.mt-1","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard","id":"emailclick","multiple":false,"parentSelectors":["businessselect"],"selector":"div.col-start-3","type":"SelectorElementClick"},{"id":"emailgrab","multiple":false,"multipleType":"singleColumn","parentSelectors":["emailclick"],"regex":"","selector":"span.font-semibold","type":"SelectorText","version":2}]}

some questions im working on answering atm //

im not too concerned on time because ill just walk away but it does seem to be moving pretty slowly, what is the recommended limit between actions? does it depend on the action?

just now testing the first function i made which is to open the links of the businesses and im feeling dumb for not realizing id need to add extra steps // annoying side note, i only need to open the business links because email doesnt seem to pop up in the parent link but everything else does shrug emoji

also i keep getting inconsistencies with running my whole function, it will just randomly search a specific part of the country im searching for instead of the whole country (no clue how thats possible lol) and itll click random businesses like not even a pattern just 3rd one 8th one 12th one its weird but i assume i messed up somewhere and on the business page it click the buttons but never captures the data // when i run just the element clicks and data grab on a business page i already opened it works flawlessly // also i figured out how to get the whatsapp link

updated sitemap

{"_id":"paginascraper","startUrl":["https://paginasamarillas.com.do/en/business/search/republica-dominicana/c/ferreterias?p=1&sort=alpha"],"selectors":[{"clickActionType":"real","clickElementSelector":"h2","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard","id":"businessselect","multiple":true,"parentSelectors":["_root"],"selector":"article","type":"SelectorElementClick"},{"id":"Name","multiple":false,"multipleType":"singleColumn","parentSelectors":["businessselect"],"regex":"","selector":"h1","type":"SelectorText","version":2},{"clickActionType":"real","clickElementSelector":"li .relative button[data-component='telephone']","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard","id":"phoneclick","multiple":false,"parentSelectors":["businessselect"],"selector":"div.col-start-3","type":"SelectorElementClick"},{"clickActionType":"real","clickElementSelector":"button.mt-1","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard","id":"emailclick","multiple":false,"parentSelectors":["businessselect"],"selector":"div.col-start-3","type":"SelectorElementClick"},{"extractAttribute":"label","id":"WhatsApp","multiple":false,"multipleType":"singleColumn","parentSelectors":["businessselect"],"selector":"a.rounded-sm","type":"SelectorElementAttribute","version":2},{"id":"phone number","multiple":false,"multipleType":"singleColumn","parentSelectors":["phoneclick"],"regex":"","selector":"span.font-semibold","type":"SelectorText","version":2},{"id":"emailgrab","multiple":false,"multipleType":"singleColumn","parentSelectors":["emailclick"],"regex":"","selector":"span.font-semibold","type":"SelectorText","version":2}]}

i am failing to find any information on how to have it open a business page scrape the info then go back and select the next business page

i will now scrape all the links of each business page and try to set up a new sitemap with all the startup urls

this is my test sitemap to see what the code looks like so i can just copy paste all the links instead of clicking add and pasting one at a time (pls add some sort of ez import list function for that but idk im new to code maybe this is how it should be)

{"_id":"lottastarts","startUrl":["https://paginasamarillas.com.do/en/business/search/republica-dominicana/c/ferreterias?p=1","https://paginasamarillas.com.do/en/business/profile/los-genao,-las-guaranas-du/ferreteria-el-picaso/B6S148439P268197","https://paginasamarillas.com.do/en/business/profile/12-de-haina,-santo-domingo-oeste-sd/ferreteria-fuente-de-amor/B4S185050P263643"],"selectors":[]}

i am assuming this will work

{"_id":"paginascraper","startUrl":["https://paginasamarillas.com.do/en/business/search/republica-dominicana/c/ferreterias?p=1&sort=alpha"],"selectors":[{"clickActionType":"real","clickElementSelector":"#B5S21979P269003 h2","clickElementUniquenessType":"uniqueHTMLText","clickType":"clickOnce","delay":1000,"discardInitialElements":"discard-when-click-element-exists","id":"businessclick","multiple":false,"parentSelectors":["business-wrapper"],"selector":"#B5S21979P269003 .yp-result-card-external-information a[data-component]","type":"SelectorElementClick"},{"id":"Name","multiple":false,"multipleType":"singleColumn","parentSelectors":["info-wrapper"],"regex":"","selector":"h1","type":"SelectorText","version":2},{"clickActionType":"real","clickElementSelector":"li .relative button[data-component='telephone']","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"do-not-discard","id":"phone-click","multiple":true,"parentSelectors":["info-wrapper"],"selector":"div.col-start-3","type":"SelectorElementClick"},{"clickActionType":"real","clickElementSelector":"button.mt-1","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1000,"discardInitialElements":"do-not-discard","id":"email-click","multiple":true,"parentSelectors":["info-wrapper"],"selector":"div.col-start-3","type":"SelectorElementClick"},{"extractAttribute":"label","id":"WhatsApp","multiple":false,"multipleType":"singleColumn","parentSelectors":["info-wrapper"],"selector":"a.rounded-sm","type":"SelectorElementAttribute","version":2},{"id":"Phone Number","multiple":false,"multipleType":"singleColumn","parentSelectors":["phone-click"],"regex":"","selector":"span.font-semibold","type":"SelectorText","version":2},{"id":"Email Address","multiple":false,"multipleType":"singleColumn","parentSelectors":["email-click"],"regex":"","selector":"span.font-semibold","type":"SelectorText","version":2},{"elementLimit":0,"id":"business-wrapper","multiple":false,"parentSelectors":["_root"],"scroll":true,"selector":"div.mt-6","type":"SelectorElement"},{"elementLimit":0,"id":"info-wrapper","multiple":false,"parentSelectors":["businessclick"],"scroll":false,"selector":"section.grid","type":"SelectorElement"}]}

thought i saw the light at the end of the tunnel with getting a link to open and actually obtain the data i want while i was setting up the sitemap to just grab all the urls

spent some time remaking/reorganizing my already made sitemap and now im getting parent element not found even though, to me, logically it all flows.

putting this here in case someone can advise me on fixing it before i finish the link grab and do the mega start url method

i have still been working on this nonstop, just took a break to eat thankfully my roommate brought me some food.

i managed to get all the links for the business pages but wasted far longer than id like to admit waiting for grok to reformat everything to have "," between each link and it all ended up coming out as hallucinated links lmao

looking into other methods for a mass reformat of 1331 links

Was actually stupid easy to reformat that in Google Docs and adding all of it to the sitemap code was even easier

It’s been running for 10-15 minutes by now and seems to be working perfectly, we will see how the data looks coming out. Very relieved for the time being at least

it finished late last night, worked perfectly. sadly there were only 85 emails out of the 1331 businesses so i didnt even need to go into each page directly.... such is life

to any new people, i thought i was smart and was skimming through what i thought applied to me and had to consistently go back and eventually just read every part of documentation and watched all the videos, and believe it or not, it answered all my questions.

I took a quick look at your last sitemap and can already see where it would fail. It contains a randomly-generated element name, which is typical for Angular. Such random names can change at any time, causing your scrape to fail. So you'll need a better selector.

i assumed that was a color code or something. if its ever looking like that "#234987235987" or whatever i should assume thats randomly generated? or is there some other thing you are noticing that means that

Color definitions would look like the examples below. Anyway, the code only has 6 hexadecimal digits. It helps if you have some knowledge of HTML and CSS, and you can confirm element names in the Devtools -> Elements tab.

<p style="color: #4CAF50;">
<div style="background-color: rgba(255, 87, 51, 0.5);">