0

How to get a list of disabled elements on a page using Cypress?

Thanks in advance.

1

A disabled html element has disabled attribute, e.g.:

<input type="text" id="name" name="name" disabled>

to find such elements in Cypress could be achieved with .get() command:

cy
  .get('[disabled]')
2
  • Thank you for your reply, but web elements does not have disabled property. then how to get list of disabled elements?
    – Rao Thota
    Sep 18 at 8:34
  • @RaoThota Then you need to update your question and tell us more. Find out how those disabled elements differ and then go write a selector for them.
    – pavelsaman
    Sep 18 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.