I want to learn webdriverio. I try to run this code:
client.init().
url('https://www.example.com').
elements('p').then((result) => {
for (i = 0; i < result.value.length; i++) {
(client.elementIdText(result.value[i])).
then((re) => console.log(re))
}
})
but that logs out nothing.
I know i can do it using getText('p'), but just wanna know how to do it using elements('p').