Any thoughts or preferences? Personally, I've noticed relative paths to be less reliable than absolute as the IDs can change.
Its actually the other way around, absolute is way less reliable than relative. Your statement is incorrect.
If the id's change , or attributes w/e your searching by, in an absolute xpath then your xpath will be broken.On top of that, relative xpath's can be so freaaaaaaaaaaking long!
With relative xpath, I just need to think in terms of groups where it starts and where it ends.
So say if I was parsing a table, I would look for the //table[@id='something']
Then take the result from that, turn it into html, and look for the rows //tr
then look for the colums //td .
I don't need to know the whole long ass xpath for absolute just the relative.
This also works great when looking for specific values on for my bots like:
Divs, and spans that are nested with each other. li tags,ul tags, and a whole other array of tags. It makes things so much easier when I just have to think in terms of where the pattern starts and ends, that is why I go for relative xpath all the time and I skip the absolute xpath.
Plus,its so much easier using xpath + regular expressions .However, I understand that as a newbie the first thing you are most likely to do is to look for values by using StringSplit, but eventually that becomes buggy so you move to bigger ,better, and more efficient things.