Understanding actionability
Now that we know what Cypress commands are, and where and when to use them, we need to understand the thought and operation process of Cypress when executing tests. In this section, we will cover how Cypress interacts with commands, how it ensures that elements are visible and actionable, and even how animation in elements is handled. We will also cover how Cypress determines actionability before any command is completed.
Actionability is the ability of Cypress to perform an action on a specific element in the Document Object Model (DOM). Cypress has commands whose sole intention is to interact with DOM elements. The commands act "as a user" and simulate interaction with the user interface of an application. Cypress events are responsible for the behavior of the commands as it sends the events to the browser, making it seem like user interaction on the application's user interface.
The following are some commands in Cypress that directly...