When I try
cy.get('div.userId')
I want to add condition div.userId
is exists/not in dom.
I am expecting not to fail test before checking existence of element in dom.
Like sometimes div.userId
is not visible and cy.get(div.userId)
fails but we ma need to click another element to make it visible. simple wanna use if-else statement upon this…
New contributor
Bilal Hussain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.