How to execute xpath function to extract classes

I wish to read all the class names of a div; for example: <div class="class1 class2 class3">

I have a xpath function that works fine:

>> "class1 class2 class3"

I’ve tested in Chrome using:


All good.

But how to use in Kantu?

I used a querySelectorAll as a workaround in the end:

executeScript | document.querySelectorAll(\".list-item\")[0].className | classNames

But it’ll still be interesting to learn the answer to the original question for future reference (if there is one).

Read means extract? or count?

Yes, extract.

(ignore, more characters …)