Update xpath

This commit is contained in:
Rico Sta. Cruz 2015-04-17 15:46:46 +08:00
parent 931f71981e
commit 35667e6a10
1 changed files with 8 additions and 9 deletions

View File

@ -25,12 +25,12 @@ layout: default
| CSS | Xpath | ? |
| --- | --- | |
| `input[type="submit"]` | `//input[@type="submit"]` | [?](#predicates) |
| `#id` | `//[@id="id"]` | [?](#predicates) |
| `.class` | `//[@class="class"]` *...see below* | |
| `input[type="submit"]` | `//input[@type="submit"]` | |
| --- | --- | |
| `a[href^='/']` | `//a[starts-with(@href, '/')]` | [?](#string-functions) |
| `a[href$='pdf']` | `//a[ends-with(@href, '.pdf')]` | |
| --- | --- | |
| `#id` | `//[@id="id"]` | |
| `.class` | `//[@class="class"]` *...see below* | |
{:.greycode.no-head}
### Order selectors
@ -45,7 +45,6 @@ layout: default
| --- | --- | |
| `a:first-child` | `//a[1]` | |
| `a:last-child` | `//a[last()]` | |
| `li:first-of-type` | `//li[not(preceding-sibling::li)]` | |
{:.greycode.no-head}
### jQuery