Skip to content

Commit

Permalink
add link to the video [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Sep 22, 2023
1 parent 9889c85 commit 3e8a3cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/recipes/number-of-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ cy.get('ul#fruits li').should(($li) => {

Imagine the page loads elements or shows "Nothing found" message. Can we confirm that one or the other happens?

📺 This example is explained in the video [Check N Items Or That Nothing Was Found](https://youtu.be/ZJcJNwli10I).

<!-- fiddle N elements or nothing found message -->

```html hide
Expand All @@ -386,7 +388,7 @@ Imagine the page loads elements or shows "Nothing found" message. Can we confirm
</script>
```

Find the `<ul id="fruits">` element with either `LI` elements inside or text "Nothing found".
Find the `<ul id="fruits">` element with either `LI` elements inside or text "Nothing found" using jQuery selector `:contains`.

```js
cy.get('ul#fruits li, ul#fruits:contains("Nothing found")')
Expand Down

0 comments on commit 3e8a3cf

Please sign in to comment.