I am using Browser plugin in Robot framework. I can’t get the xpath or css path for MPP Status. It should give PASS(or FAIL). I have tried a few options but no luck:
Get Text //*[contains(text(), 'MPP Status')]//following-sibling::span
Get Text //*[contains(text(), 'MPP Status')]//following-sibling::span equal 'PASS'
<table _ngcontent-c="" class="table table-vertical">
... <tbody _ngcontent-c=""><tr _ngcontent-c="" class="ng-star-inserted">
... <th _ngcontent-c="">MPP Status</th><td _ngcontent-c="">
... <!---->
... <!---->
... <span _ngcontent-c="" class="label label-success ng-star-inserted"> PASS </span>
... <!---->
2
Answers
Working one should be
What do the
...
and<!---->
mean? Does that mean you removed markup to try to make it look simpler? If so you’re probably not showing the true hierarchy of the data.In html tables,
th
andtd
are usually intr
. Assuming that’s how your data is actually structured, try something like this…or
If neither of these work, we’ll need to see more of the structure to determine the correct xpath.