LoginSignup
7
4

More than 1 year has passed since last update.

Testing LibraryのgetByRoleで指定できる属性一覧

Last updated at Posted at 2023-01-16

getByRole("指定するキーワード")で取得可能。
属性が複数存在する場合はgetAllByRole("指定するキーワード")で取得する。

属性 指定するキーワード
article article
button button
td cell, gridcell
input(type=checkbox) checkbox
input(type=radio) radio
input(type=search) searchbox
input(type=text) textbox
th columnheader
select combobox, listbox
menuitem command, menuitem
dd definition
figure figure
form form
table grid, table
fieldset group
h1 ~ h6 heading
img img
a link
link link
ol, ul list
li listitem
nav navigation
option option
frame region
rel roletype
tr row
tbody, tfoot, thead rowgroup
hr separator
dt, dfn term
textarea textbox

aタグはhref属性が無いと反応しない?要検証、、、

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