Im new to Puppeteer and Nodejs and Im trying on scrolling inside this Modal and after every 10 accounts there comes a Show More Results Button. Now what I want to achieve is that I get the href property of every account(which im currently able to for first 10 which showup by default) and then hit the Button and get the next 10 and keep on doing it for untill all the accounts are done. Any Help will be Appreciated. Cudos!! enter image description here This is the button Im trying to click coz it loads new list, what i aim on doing is to scroll through this entire list while getting the hrefs of all the people, but since this button wont open in chromium and also im unable to click on it. Any Suggestions on how i can achieve this task. Your help would be really appreciated.
Asked
Active
Viewed 192 times
1
-
1Check this answer, might be useful: https://stackoverflow.com/questions/53200857/puppeteer-node-js-to-click-a-button-as-long-as-it-exists-and-when-it-no-lon – Abdulhakim Nov 25 '21 at 17:25
-
If modal is a part of the html page, then no problem, you can click on modal button just like any other button. Just try to grab modal button id, name or class. – Abdulhakim Nov 27 '21 at 14:30
-
i have added the image in the post after editing i hope you can see it if not please to comment below actually im new to stackoverflow so i dont really know how it works and how to picture to the comment – Newbie Developer Nov 27 '21 at 15:43
-
`await page.click("button[id='ember689']"); ` This code will click on the button. – Abdulhakim Nov 27 '21 at 16:49
-
but the problem is that the button id changes everytime the page reloads – Newbie Developer Nov 27 '21 at 16:52
-
`await page.click('div[class="social-details-reactors-tab-body"] > button'); ` Maybe you can try this? – Abdulhakim Nov 27 '21 at 17:48
-
1Thank You so much for your help. Got it work!! – Newbie Developer Nov 29 '21 at 05:26
-
Can you review this? [link](https://stackoverflow.com/questions/70613068) @Abdulhakim – Newbie Developer Jan 07 '22 at 11:22