Simply add [] to the end of your .

//*[@id="tabMiddleDIV_Port Details"][1]

Alternatively if the returned elements are not the same time, i.e. if one is a button and one is a div or something, then specify the tagname instead of using 20;*21;

//button[@id="tabMiddleDIV_Port Details"]

But if they’re both the same element type and have the same id (which is not supposed to happen) then specify the one you want inside brackets.

Source link


Please enter your comment!
Please enter your name here