In my application there’s a button which needs to be clicked if it is enabled.
I tried using Get attribute activity but it’s not displaying the ‘aastate’ attribute.
Is there any other way to know wthr the button is enabled?
Can anyone help pls?
can you open uiexplorer and capture the selector, and then show the uiExplorer window here?
Thanks for the reply.
Due to privacy policies I am unable to upload the screenshot.
In UIExplorer i can see the aastate under properties. Still it’s not available under Get attributes activity.
Any suggestions u can give pls?
Have you tested to just type “aastate” in the Get Attribute activity?
Can you at least show us your selector?
If aastate is a property of the element, Get Attribute should be able to get it.
Are you sure you don’t have the variable defined more than once in different scopes?
@ptrobot : Thanks for the reply
V can try like this also? I mean even if that aastate option not present in the list still it will be valid to just type and use aastate?
Yes, you can just type it since you already verified that it exists in UI Explorer.
I tried as u suggested.
But its giving me result as enabled only even if button is enabled or disabled.
aastate not helping at all
@postwick Thanks for the reply.
I am not allowed to share the screenshots or code details in public forum hence i have posted the query in a generalised way.
I am also not sure why aastate not populating under get attributes even if its there in ui explorer.
Is there a work around if possible.
Thanks in advance
how about class attribute? does it contain “disabled” or anything similar?
No. Class is showing value as : x-btn-icon-el
Nowhere anything is mentioned related to disabled.
aastate value is displayed as enabled even if button is enabled or disabled
Yeah I’ve noticed this too. I don’t know if it’s a UiPath issue or something with the browser.
You could click it and then check if the desired result occurred. If it didn’t, then assume the button is disabled.
How different does the button look when it’s enabled vs disabled? If it looks different you could use Image Exists (or Check App State in image mode) to match against.
x-btn-icon-el for both enabled/disabled?
and are there other attributes that are different for enabled/disabled button?
using aastate has the risk of too low reliability
in general it is recommended to get cleared
the details of the button: button elemen, div with js events…
the details of disbaled in sense of disabled attribute, css styles, js set attribute
A html button disabled we can detect with the help of outer html attribute:
existing but non displayed elements we can Check CSS Property value with following:
just to mention a few of other available options
class value is same in case of enabled and disabled.
i will check for other attributes now to find any differences found for enabled/disabled scenarios.
They were almost same only.
But will still reverify.
But i could not find any ‘disabled’ related value anytime.
@ppr Thank u for the reply.
I shall check as u suggested.
In case of disabled the button gets greyed out while it is orange in enabled state
I shall check as u suggested.
Thank u for the help
Can you try with App state or Element exists activity by including the aastate in the selector.
Then maybe using a if activity you can make the decisions.
@Rahul_Unnikrishnan thanks for the reply.
aastate is always showing as enabled even if button is enabled or disabled.
Its not working at all
Does the button work with SimulateClick or SendWindowMessages? If yes, then you could just wrap the Click activity in a Try Catch and look for the error message “The target element is disabled.”