How to wait until element is visible in Cypress without using timeout.
Currently I am using below method, but I don’t need time and interval:
Cypress.Commands.add(‘waitForElementPresent’, (locator, time, inter) => {
cy.waitUntil(() => {
return Cypress.$(locator).length
}, {timeout:time,
interval:inter})
})
But this method will wait till the time we provided. But I need a method which can wait till element is visible without timeout.
I need to test this scenario so that I can record the time taken for the element to visible.