I have a html code as
..
/div[2]/div[1]/ol/**li[1]**/header/div[2]
...
/div[2]/div[1]/ol/**li[2]**/header/div[2]
...
means two orderly listed items
So if i try searching for /div[2]/div[1]/ol/**li**/header/div[2]
, my selenium code says exists, but actually it doesn't. I think my selenium code is pointing out the headers in both of the listed items. How to fail the code if /div[2]/div[1]/ol/**li**/header/div[2]
this doesn't exist.