Discussion:
http://stackoverflow.com/questions/16199458/how-to-replace-the-getelementbyidid-textcontent-sentence-using-xpath

Nice answer:
http://stackoverflow.com/a/16199549/471673

In essence:
getElementById(someid)
//*[@id=’someid’]

getElementsByTagname(tagname);
//tagname

getElementsByClassName(classname)
//*[contains(concat(‘ ‘, @class, ‘ ‘),’ classname ‘)]

Advertisements