-
I'm currently trying to get specific children from an element but can't seem to get it to work. var details = await page.EvaluateFunctionAsync<Object>(@"
(index) => {
const block = document.querySelector('div.grupo_prefiles:nth-child(index)');
return block.querySelector('#at1_0') ? block.querySelector('#at1_0 > .valor').innerText : 'No Data';
}", childIndex); Error that is thrown: I've tried it with a hardcoded value instead such as 3 instead of index and that works just fine. I'm sure that it is something I've missed, so if anyone has a clue I would be so so happy! |
Beta Was this translation helpful? Give feedback.
Answered by
kblok
Dec 16, 2024
Replies: 1 comment 3 replies
-
You have
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
kblok
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have
index
inside the string. It should be something like this