I am using XPath to search the below web elements. My XPath command returns 2 nodes. I am trying to retrieve 1 node. Unfortunately, the web page I am testing has the exact same elements and text. Can you help? I am using ChroPath to test my XPath. Thanks in advance!
XPath command is:
//*[@id="'tabMiddleDIV_Port Details'"]
The HTML Elements from my Web Page are:
<div class="DNMSTabClass" style="visibility: visible; display: inline;">
<div id="'tabLeftDIV_Port Details'" class="DNMS_Tab DNMS_Tab_Corners DNMS_Tab_Left_On"></div>
<div id="'tabMiddleDIV_Port Details'" class="DNMS_Tab DNMS_Tab_Title DNMS_Tab_Title_On DNMS_Tab_Middle DNMS_Tab_Middle_On" style=""> Port Details</div>
<div id="'tabRightDIV_Port Details'" class="DNMS_Tab DNMS_Tab_Corners DNMS_Tab_Right_On"></div>
</div>
<div class="DNMSTabClass" style="visibility: hidden; display: none;">
<div id="'tabLeftDIV_Port Details'" class="DNMS_Tab DNMS_Tab_Corners DNMS_Tab_Left_Off"></div>
<div id="'tabMiddleDIV_Port Details'" class="DNMS_Tab DNMS_Tab_Title DNMS_Tab_Title_Off DNMS_Tab_Middle DNMS_Tab_Middle_Off" style=""> Port Details</div>
<div id="'tabRightDIV_Port Details'" class="DNMS_Tab DNMS_Tab_Corners DNMS_Tab_Right_Off"></div>
</div>