LoginSignup
3
7

More than 5 years have passed since last update.

表の xpath

Last updated at Posted at 2013-11-28

表の1 行目にある文字を指定して、マッチした列の別の行の要素を取得する。

具体的には、下のような表の場合に a を指定して c を取得したい場合。

a b c
d e a
f a g
//table//tr[td[1][text()="a"]]/td[3]
$x('//table//tr[td[1][text()="a"]]/td[3]')
3
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
7