How to check if a button is Clickable
There is a List of names in a table with pagination on my web page with Previous and Next buttons.
Each page displays 5 results
If there are less than or equal to 5 pages-> Next button is disabled.
I was trying to write a test to see if the button is clickable or not->if it is clickable then Click on it , if not no action
I was trying to use properties Enabled but Enabled always gives me True not matter if the button is disabled or not.
I have tried the following properties. None of them seemed to help:
1. Enabled
2. Disabled
3. IsDisabled
are there any other properties which could help me differentiate if a button is clickable or not?
I could think of a way to see if button has a link /url behind it but it does not seem to be working as well
Any suggestions??
Hi,
Like Robert wrote...
Web applications are extremely inconsistent and may use dozens of different techniques within the same application to do the same thing: set element itself as disabled, set its parent as disabled (or parent of the parent, or...), change applied class during runtime, ...
The most easy and effective way to answer your question is to ask developers about how this button is disabled.
If developers are not accessible then you will have to spend your time investigating differences between the enabled and disabled button (and its parent(s) ) in the Object Browser to find out the proper indicator.