[shadow-root content] Javascript generated content missing in HTML but displaying in screenshot #2656
Unanswered
NiklasRosenstein
asked this question in
Q&A
Replies: 1 comment 1 reply
-
It is really not necessary to click anything if you are scraping the page! the content is already there, you do not need to remove that cookie popup! second, the content is injected into the html element "shadow root" so it not selectable try this xpath we dont (yet) really support content stuffed into the shadow-root |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm trying out changedetection for the first time. I want to get notified of changes to this page: https://jfrog.com/help/r/jfrog-release-information/artifactory-release-notes
They use Javascript to generate the page content, so I'm using a
selenium/standalone-chrome:4
container as shown in thedocker-compose.yml
. There's also a "accept cookies" dialog that seemed to be the only content extracted at first (despite the actual content I want displaying in the background).Text extracted
My thinking was that maybe something causes the cookie pop-up to appear like the "primary content", so I've added the following Javascript to run before taking the screenshot:
But unfortunately that just removes the cookie pop-up text from the extract and still does not show the content in
<div id="center">
.Text extracted
As you can see in the screenshots that are attached to the snapshot, the content I want is there. However when I download the latest HTML snapshot it's not there.
1727089350.html.zip
I've also tried to use the following XPath to no avail (it errors that it can't find the element).
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions