This repository was archived by the owner on Aug 1, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,5 @@ website/build/
10
10
website /yarn.lock
11
11
website /node_modules
12
12
website /i18n /*
13
+
14
+ .idea /*
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ sidebar_label: Queries
11
11
### getBy
12
12
13
13
` getBy* ` queries returns the first matching node for a query, and throws an error if no elements
14
- match.
14
+ match or if more than one match is found (use ` getAllBy ` instead) .
15
15
16
16
### getAllBy
17
17
@@ -21,7 +21,8 @@ elements match.
21
21
### queryBy
22
22
23
23
` queryBy* ` queries returns the first matching node for a query, and return ` null ` if no elements
24
- match. This is useful for asserting an element is not present.
24
+ match. This is useful for asserting an element is not present. This throws if more than one match is
25
+ found (use ` queryAllBy ` instead)..
25
26
26
27
### queryAllBy
27
28
@@ -31,7 +32,8 @@ match. This is useful for asserting an element is not present.
31
32
### findBy
32
33
33
34
` findBy* ` queries return a promise which resolves when an element is found which matches the given
34
- query. The promise is rejected if no element is found after a default timeout of ` 4500 ` ms.
35
+ query. The promise is rejected if no element is found or if more than one element is found after a
36
+ default timeout of ` 4500 ` ms. If you need to find more than one element, then use ` findAllBy ` .
35
37
36
38
> Note, this is a simple combination of ` getBy* ` queries and
37
39
> [ ` waitForElement ` ] ( /docs/api-async#waitforelement ) . The ` findBy* ` queries accept the
You can’t perform that action at this time.
0 commit comments