Complete the code to select a button inside a form using chaining.
cy.get('form').[1]('button')
The find command is used to chain selectors and find a descendant element inside the previous selection.
Complete the code to get a list item with class 'active' inside a nav element.
cy.get('nav').[1]('li.active')
find is used to locate elements inside the previously selected element.
Fix the error in chaining to get a child input inside a div with id 'search'.
cy.get('#search').[1]('input').type('hello')
find is the correct command to locate a child element inside the current selection. Using get again resets the search to the whole document.
Fill both blanks to chain commands that select a form, then a text input inside it.
cy.get('form').[1]('input').[2]('have.attr', 'type', 'text')
First, find locates the input inside the form. Then, should asserts the input's type attribute is 'text'.
Fill all three blanks to chain commands selecting a list, then active item, then click it.
cy.get('ul').[1]('li.active').[2]().[3]()
Use find to get active list items inside the ul, first to pick the first one, then click to click it.