Update xpath
This commit is contained in:
parent
931f71981e
commit
35667e6a10
9
xpath.md
9
xpath.md
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue