~/talk

XPath yourself: Tips & Tricks

TalkinRussianat QA Fest 2015 · on Saturday, 2015-10-31· [testing]
links:none on file
slides:none on file

Concrete, practical rules for writing more reliable XPath selectors: use explicit axes (e.g., ancestor::, following::) instead of chains of .. or //, avoid absolute paths, and prefer child predicates like div[1] rather than global grouping ((//div)[1]) because they have different position semantics. Use functions position(), last(), contains(text(), ...) and normalize-space() for resilient matching, be careful with the predicate-ordering quirk when combining numeric positions and filters, and compute table column/index positions with count(preceding::*)+1 instead of hardcoding numbers.

AI-written summary · about

  1. 0:00XPath introduction
  2. 1:05XPath as query language
  3. 3:13Full vs abbreviated XPath
  4. 5:23Parent vs ancestor axes
  5. 7:54Stable queries with axes
  6. 10:21Absolute path issues
  7. 12:07Text and content search
  8. 14:14Position functions
  9. 15:39Position/last filtering errors
  10. 17:46Tables and dynamic elements
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.