Scroll to Element not working on popover

I am validating if the content of the popover contains the expected text. This popover is composed of 3 accordions that can be minimized or maximized. What I want to do is after opening the first accordion, I want to scroll down to the bottom part of the popover but when I try to scroll element that points to the next accordion, it just moves a little and not scrolls down to the bottom. I’ve also tried scrolling to the last element in the first accordion, it works but still I can’t proceed with the second accordion because it’s not scrolled to that element.

Here’s the screenshot of the popover:

If you show me the HTML (I’d prefer Firefox DevTools) I should able to see the element controlling the scroll mechanism. With that knowledge, then I’d be able to write some JavaScript which you could try.

Hi there,

Here’s the screenshot of the HTML of the popover

I said that for a reason.

Hi Russ,

Sorry about that. Here’s the screenshot of the HTML of the popover in Firefox DevTools

First we need to conduct a little test in the browser’s console. Bring up the page again in Firefox. Go to the console tab in DevTools. Type this in the console:

document.querySelector("#InfoPopOver div.popover-i-category:nth-child(2)").scrollIntoView(false)

I think that 2 is correct based on your screen shot. Tinker with it if I got it wrong.

If that doesn’t work, then we need to target the element with scroll beside it in your screenshot.


That element needs to replace document in that code above. But that’s a bit trickier so let me know how it goes.

I have tried using the code that you have suggested above but it gives me this error message:

image .

Regarding your suggestion #2, I’m not sure how to target it. Can you please walk me through it?

Thank you.


I said “category”:

document.querySelector("#InfoPopOver div.popover-i-category:nth-child(2)").scrollIntoView(false)

Oh sorry I took the wrong screenshot, but yes, I have also tried the category and it returns the same error.

There are two category classes in your screenshot. But do try tinkering with the “2”.