G
G
Goobert Crypto2020-01-07 01:59:22
css
Goobert Crypto, 2020-01-07 01:59:22

How to click on a button until it hides with puppeteer?

5e133573686e1004893278.png
var cnopka = await page.querySelector('span[aria-label="Load more comments"]');
while (cnopka==false)
{
await page.click('span[aria-label="Load more comments"]'),
await new Promise(r => setTimeout(r, 5000));
}
There is a button that disappears when all comments are displayed in any instagram post, I need this button to be pressed so many times until it shows all comments (after it shows all comments it will disappear), I tried to implement it with puppeteer, it does not work, help please)))

Answer the question

In order to leave comments, you need to log in

3 answer(s)
ⓒⓢⓢ, 2019-03-14
@VladikLinnik

https://yadi.sk/i/B0__GVU90kOObA
Red block - list layer
Green block - image
layer position the image layer above the list layer, apply z-index
In this version, I don’t see any problems, what exactly is your snag?

D
Dmitry, 2019-03-14
Chainikov @Dan_Stanly

Try adjusting via span, with the width of the container span12like this:

<div class="row">
   <div class="span3">Левая сторона (Банкрол и т.д.)</div>
   <div class="span6">Центр контейнера (экрана) с пирамидой</div>
   <div class="span3">Правая сторона (x10 и т.д.)</div>
</div>

H
Herman Coffman, 2021-11-05
@Gera01

try(selector present)
{
click present
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question