Dropdown Pagination for UL LI elements

Hi, the target page is a login based static URL. At the top of it, there is a drop down menu that has a list of 5,000+ project names. When clicking on a project in the drop down, the information in the middle of the page changes to reflect information on that particular project.

I am trying to incorporate an ElementClick selector to click on each project from the drop down and then use text selector to scrape data but I am stuck at finding the right "clickElementSelector that will click each project one after the other.

Sitemap:
{"_id":"Data","startUrl":["Login based"],"selectors":[{"clickActionType":"real","clickElementSelector":"span#select2-Project_UPC-container","clickElementUniquenessType":"uniqueText","clickType":"clickMore","delay":500,"discardInitialElements":"do-not-discard","id":"projects","multiple":true,"parentSelectors":["_root"],"selector":"parent","type":"SelectorElementClick"},{"clickActionType":"real","clickElementSelector":"li.select2-results__option","clickElementUniquenessType":"uniqueHTMLText","clickType":"clickOnce","delay":500,"discardInitialElements":"do-not-discard","id":"click each project","multiple":true,"parentSelectors":["projects"],"selector":".main-parent > div","type":"SelectorElementClick"}]}

Attached relevant website element below.

Thanks


Hi,

I can't give a definitive answer without being able to inspect the HTML.

I guess the 'Click selector' for click each project looks correct, keep in mind that the 'Selector' field should match the element where the target data will be located.

I would change the 'Selector' field of projects to html

Thanks for the reply JanAp. I tried changing it to html but it doesnt work either.

Where I am stuck at is that the click selector is not going one after the other in the dropdown list of projects. The drop down expands, clicks the first project, expands again, clicks the first project and then the scraping window closes.

I am attaching a screenshot of the relevant HTML section. I want the scrapper to click the elements mentioned below the Green Line in the image.


e

Hi, I found a page with similar architecture

https://library.tiktok.com/ads?region=all&start_time=1664575200000&end_time=1703409951102&adv_name=&adv_biz_ids=&query_type=&sort_type=last_shown_date,desc

in this, I want the 34 inputs under "Ad target country" to be clicked one after the other.