Absolute XPath  \

Relative XPath  \\

Single Attribute

Multiple Attribute

AND

OR

Contains  :  //*[contains(@attribute_name, 'attribute_value')]

Starts-with  :  //*[starts-with(@id,'Em')]

text  :  //*[text()='text']

last  : (//input[@type='text'])[last()]      最后一个输入框      (//input[@type='text'])[last()-1]    -1的话就是倒数第二个输入框  

following  :    //input[@id='FirstName']//following::input[@type='text']      在指定输入框之后的那个输入框     //following::input[1]

preceding  :  //input[@id='LastName']//preceding::input[@type='text']     在指定输入框之前的那个输入框

<a href="...">some text</a>          //a/text()   =  some text 

//table/re/th/substring(text(),0,4)             Text manipulation, first 4 chars from each table heading