https://cypress.io logo
This works a treat! ` cy.window() ...
# general-chat
n
This works a treat!
Copy code
cy.window()
          .its("innerWidth")
          .then((w) => {
            if (w >= 768) {
              cy.get(".search-group-container > .form-control").type(
                "Pinot Noir"
              );
            } else {
              cy.get("#search").type("Pinot Noir");
            }
          });