LoginSignup
4
4

More than 5 years have passed since last update.

$x(path)でxpath式に当てはまるDOM要素を返す。

Posted at

タイトルの通り。

Google Chromeのコンソールパネルから

$x("//p[a]")

みたいな感じで、xpath式で該当するDOM要素を返してくれる。

Capybaraでxpath形式で指定しているのがあっているのかを確認するときに便利だった。

参考

javascript - What is the variable $x used for in Chrome? - Stack Overflow

Command Line API Reference - Google Chrome

4
4
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
4
4