1. Selenium Element Locator
    1. identifier=id
    2. id=id
    3. name=name
    4. dom=javascriptExpression
    5. xpath=xpathExpression
    6. link=textPattern
    7. css=cssSelectorSyntax
  2. What?
    1. XPath uses path expressions to navigate in XML documents
    2. XPath contains a library of standard functions
    3. XPath is a major element in XSLT
    4. XPath is a W3C recommendation
  3. Nodes
    1. types
      1. element
      2. attribute
      3. text
      4. namespace
      5. processing-instruction
      6. comment
      7. document nodes
    2. relationship (tree)
      1. parent
      2. children
      3. siblings
      4. ancestors
      5. descendants
  4. path expression
    1. expressions
      1. /
        1. Selects from the root node
      2. //
        1. Selects nodes in the document from the current node that match the selection no matter where they are
      3. .
        1. Selects the current node
      4. ..
        1. Selects the parent of the current node
      5. @
        1. Selects attributes
    2. Predicates
      1. sequence
        1. /bookstore/book[1]
      2. function
        1. /bookstore/book[last()]
      3. attribute
        1. //title[@lang='eng']
      4. sub element
        1. /bookstore/book[price>35.00]
      5. logical operator
        1. /bookstore/book[price>35.00 and @type='WEB']
    3. wildcards
      1. *
        1. Matches any element node
      2. @*
        1. Matches any attribute node
      3. node()
        1. Matches any node of any kind
    4. axes
      1. axisname::nodetest[predicate]
      2. types
        1. ancestor
        2. following-sibling
        3. attribute
        4. etc...
    5. operators
      1. |
        1. //book/title | //book/price
      2. and
        1. price>9.00 and price<9.90
      3. etc...