I have a very simple test to check submit button is disabled or not. get the locator
The code is like:
`sub_button = page.get_by_role(“button”, name=”Submit”)
expect(sub_button).to_be_disabled()`
And getting error :
E AssertionError: Locator expected to be disabled
E Actual value: False
Call log:
E LocatorAssertions.to_be_disabled with timeout 5000ms
E – waiting for get_by_role(“button”, name=”Submit”)
E – locator resolved to …
Can anyone help and give some ideas?
Thanks
Richard
- tried to change the code to using locator, and method to check is_disabled, but none of them worked.
New contributor
yi wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.