Evelyn_Lu
(Evelyn Lu)
September 9, 2024, 6:57am
1
Hey guys,
How can I use the activity to verify that the button is clickable?
Is there anyone could help to solve the following issue? Thank you.
When I input a supplier contact, two scenarios may occur:
Clicking “search”, if the supplier contact exists in the system, the “Next” button appears with a gray background and is unclickable.
If the supplier contact does not exist in the system, the “Next” button appears with a blue background and is clickable.
SorenB
September 9, 2024, 7:00am
2
Hello @Evelyn_Lu
You can use the Activity “Get Attribute” to check if the button is “enabled”.
Regards,
Soren
@Evelyn_Lu ,
Use get attribute activity to check if it’s enabled or not. There would a property like enabled or class which will indicate the button is enabled or disabled.
On this result basis you can use If Activity for further action.
Thanks,
Ashok
Evelyn_Lu
(Evelyn Lu)
September 9, 2024, 7:04am
4
Hi @ashokkarale , Can I use the “Check app state” instead of “If” activity, because I’m not clear about the usage of “If” . Thanks.
@Evelyn_Lu ,
Yes, Check App state will also work. Just make sure the selector is selected correctly to identify the button is enabled or disabled.
This will save you extra If activity as well.
Thanks,
Ashok
Anil_G
(Anil Gorthi)
September 9, 2024, 7:20am
6
@Evelyn_Lu
you can directly use check element activity
this would checks if element is enabled or disabled
cheers
Evelyn_Lu
(Evelyn Lu)
September 9, 2024, 7:39am
7
Okay, what do you mean the selector is selected correctly to identity the buttons is anable or not? could you share the screenshot or example? Thank you so much.
ppr
(Peter Preuss)
September 9, 2024, 7:42am
8
in such scenarios we are using UiExplorer / Browser F12 Webtools and inspecting the attributes, which are triggering the enable state.
Examples:
depending on this we can derive a strategy which allows us to detect the button enabled/disabled state.
When a found attribute is offered by a CSS Property, which is not offered by the UiPath element properties the following component can help as well
Hi @Evelyn_Lu
You can use the check element activity
Indicate the element, then create the variable it will give the true or false
Based on that you can use the activity inside if condition
Regards,
Gowtham K