2022-11-23

chromedp how to select specific textarea from multiple with dynamic names

I have a page which has multiple textarea's which are made with dynamic names and identical classes. This means I cannot select them by id, name, class or type.

What I do know is that out of the 5 textarea's, I need the first one and I want to change the value of that one.

Can anyone tell me how I can do this with chromedp? been trying for two days without any progress.

Found the answer:

const n = document.querySelector('.elementor-repeater-fields:nth-child(2) textarea'); console.log(n);



No comments:

Post a Comment