In which case Xpath won’t work ??
Xpath works most of the times. As far as i have concerned there no cases where xpath doesnot work.
If you need to switch to frames then you need to specify the id , name or index or in cases where you need to switch between windows.
Please let us know if you are finding issues with Xpath