¿Cómo puedo escribir correctamente este código, de tal manera que sea una sintaxis válida y si no se respeta, debo tener a alguien más con él?
Básicamente, quiero buscar un texto en una ventana emergente. Si no existe, ingrese el código en la instrucción else.
cy.get(".ibxudA").find('.WildnessText-kRKTej').should('have.text',"Wildness")Puede obtener el asunto devuelto por find y evaluar el texto usando los comandos de JQuery.
cy.get('.ibxudA').find('.WildnessText-kRKTejj').then(($el) => { if ($el.text() !== "Wildness") { // code to execute if it does not have the text } else { // code to execute if it does have the text } });