அடுத்த உறுப்பு
தேர்ந்தெடுக்கப்பட்ட DOM-உறுப்பின் அடுத்த உடன்பிறப்பு உறுப்பை திருப்பித் தருகிறது.
பயன்பாடு
$(selector).nextElement()
உதாரணங்கள்
index.html
<div class="parent">
<p>Sibling One</p>
<p>Sibling Two</p>
<p>Sibling Three</p>
</div>
nextElement.js
it('should get text from next sibling element', async () => {
const elem = await $$('p');
const nextElement = await elem[1].nextElement()
console.log(await nextElement.getText()); // outputs: "Sibling Three"
});