I am trying to grab a title off of a LWC button that is a basic component button with a title as title='Enabled button'. Right now I am checking if it is disabled by doing expect(selectBtn.disabled).toBe(false); and this is working to check if it is disabled or not.

1 Answer 1


To get this to work do expect(selectBtn.title).toBe('Enabled button'); as this will go ahead and select the title attribute off of the button

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.