question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

click() isn't working: scrolling issue?

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 1.12.2
  • Platform / OS version: uname -a Linux henrique-Latitude-5480 4.15.0-45-generic #⁠48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic
  • URLs (if applicable):
  • Node.js version: v10.15.1

What steps will reproduce the problem?

I have the following piece of code, in a simplified way:

await Promise.all([
    _ifrArvoreFrameSEI.waitForNavigation(), //_ifrArvoreFrameSEI is class: Frame
    _ifrVisualizacaoSEI.waitForNavigation(), // _ifrVisualizacaoSEI is class: Frame
    _ifrArvoreFrameSEI.click('a#anchor18335653')
]);

What is the expected result? Click on element ‘a#anchor18335653’ and resolves the waitForNavigation() promises.

What happens instead? sometimes waitForNavigation timeouts

So I ran Chrome with graphical interface, and verified that _ifrArvoreFrameSEI.click(‘a#anchor18335653’) doesn’t seem to be scrolling. When I have the following screen, it works:

image

But on this one, it doesn’t work:

image

I think the problem might be in the scroll bar marked with Red, as puppeteer doesn’t seem to be scrolling it. Sorry for the black stripes, I had to add them because the screen potentially shows private data.

‘a#anchor18335653’ is shown below. image

When I manually scrolled the bar, in the 5 seconds given by Atomics.wait, it works:

var sab = await new SharedArrayBuffer(1024);
var int32 = await new Int32Array(sab);
await console.log("SLEEPING");
await Atomics.wait(int32, 0, 0,5000);

await Promise.all([
    _ifrArvoreFrameSEI.waitForNavigation(),
    _ifrVisualizacaoSEI.waitForNavigation(),
    _ifrArvoreFrameSEI.click('a#anchor18335653')
]);

It woks if Chrome is launched with defaultViewport: {width: 2000, height:2000}

I’ve also noticed that the code bellow works fine:

await Promise.all([
    _ifrArvoreFrameSEI.waitForNavigation(), //_ifrArvoreFrameSEI is class: Frame
    _ifrVisualizacaoSEI.waitForNavigation(), // _ifrVisualizacaoSEI is class: Frame
    _ifrArvoreFrameSEI.evaluate( () => document.querySelector('a#anchor18335653').click())
]);

Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aslushnikovcommented, Mar 7, 2019

@hlr1983 thank you very much! I was able to repro and add a failing test; we’ll fix it shortly.

1reaction
hlr1983commented, Mar 6, 2019

Ok. Sent to lushnikov[at]google.com

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Scrolling Not Working Issue in Chrome
First, open an Incognito window in Chrome (three-dotted menu icon at top right -> New incognito window), then try scrolling to see if...
Read more >
5 Ways to Fix Your Scroll Wheel if It's Not Working in Chrome
Struggling with scroll wheel not working in Chrome issues? ... Click on the Extensions icon in the Toolbar, and select Manage extensions ......
Read more >
How to Fix It When Your Mouse Scroll Is Not Working - Lifewire
When the mouse won't scroll, there are two issues that most commonly cause it. The first is dust and dirt causing mechanical issues...
Read more >
Button on-click scrolling not working - Stack Overflow
OP, your button click event needs to be inside of the $(function() { ... }) section. This section will be executed after waiting...
Read more >
How to Fix Your Middle Mouse Button When It's Not Working
1. Check Your Mouse Hardware for Problems · 2. Run the Hardware Troubleshooter · 3. Update Your Mouse's Drivers · 4. Install OEM...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found