Below code is for finding parent. What needs to be passed instead of ".." to access child?
const parent = paragraph.$('..')
console.log(parent.getTagName()) // outputs: "body"
Do you know which elements are you looking for? Check these examples:
paragraph.$$('//*')      // find all childs
paragraph.$('a')         // find first child link
paragraph.$('*=Submit')  // find first child element which contains 'Submit'
You can use any locator strategy as you want - CSS, XPath, TagName or by text. Check documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With