Hiya,
I need some help regarding an XPath and how to create the one I need for my test case.
This is the HTML
<li class="node depth0 active" id="filtertree_10651" data-open="false" data-json='{"max_depth":"2","bin_id":"5","id":"10651","leftv":"7505","rightv":"7510","depth":"1","name":"Preview 20.4 07-20 (geen vragen)","class":"","items":"0"}' data-node_id="10651"><div class="label" style="padding-left: 16px;"><span class="opencloseicon font-icon fas fa-caret-right" style="left: 0px; visibility: visible;" data-loader="kc07p3wv" data-loader-disabler="14334" data-load_count="0"></span><span class="name">Preview 20.4 07-20 (geen vragen)</span></div></li>
Screenshot:
What I want is the following. I need Katalon to click on
<span class="opencloseicon font-icon fas fa-caret-right" style="left: 0px; visibility: visible;" data-loader="kc07p3wv" data-loader-disabler="14334" data-load_count="0"></span>
That is the arrow of the bottom Preview (I want to open it).
However, on the web page I will have multiple arrows (at the moment 2, but later will be more).
The arrows have the same elements apart from the data-loader-disabler. This one is different per âpreviewâ however, for me it is not known what number will be generated when I create a new âpreviewâ. So I canât use it as reference.
So I have thinking. Can I make an object that looks at
</span><span class="name">Preview 20.4 07-20 (geen vragen)</span>
Specifically the text and then let it click on the parent above it
<span class="opencloseicon font-icon fas fa-caret-right" style="left: 0px; visibility: visible;" data-loader="kc07p3wv" data-loader-disabler="14334" data-load_count="0"></span>
Iâm not that great in HTML and XPaths myself. Iâve tried it a bit by googling around but I get more quastions than answers when I try lol.
Thanks in advance.