18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Explaination needed on childNodes() and parentNode() APIs.
Hi All,
I am new to Sahi. I wanted to know the use of childNodes() and parentNode() APIs. What is use of these APIs, how they work. If possible please provide example.
Thanks in Advance!
I am new to Sahi. I wanted to know the use of childNodes() and parentNode() APIs. What is use of these APIs, how they work. If possible please provide example.
Thanks in Advance!
This discussion has been closed.
Comments
The parentNode API is used to return the parentNode of the element.The syntax is
_parentNode(element, tagname[, occurrence]);
for eg:
In <div id="div1"><a href="">aElement</a></div>
_parentNode(“DIV”, _link(“aElement”)), is used to return the immediate "Div" parent node of _link("aElement") element,the div element with id "div1".The occurence 1 returns the immediate parent node(div1) and if the occurence is 2 returns the parent node of _div("div1") element.
Regards,
Theeran.