Java Application - How to click grayed out elements

I need to click if the Uielement is enabled like below.
image .
If it is grayed out/opaque/ disabled then it should not click the button like below image

please advise if it is possible with click activity not with image activity.

The selector for both the buttons will be different.
i.e. the disabled one will have a different css or div class id value

you can get the difference in the selector value and use that in the selector of find element and then the result you can use in the if condition and then if enabled u click otherwise u dont.

If you want more details on how to provide me your selector values for both the button types, with parent div class(which will be the differentiating factor), ill explain in detail how you can achieve it

Nope I am not getting parent Id and CSS/Div details in slectors and I can see same selectors for both image/elements,
if you to want try this button click please check and help me with xaml

below is the link for buttonclick javaapp

Ok, you are trying to automate a Java app. That requires some additional dlls to be included.

Use this below link to install and setup the access-bridge.
Sections to cover:

  1. Downloading Java Access Bridge 2.0.2
  2. Installing Java Access Bridge for Windows 64-Bit or 32-Bit Table 2-2.
  3. Restart Uipath Studio.
    Java elements will be recognized.

I have created the workflow, and it is working the way you expect.

*It will work once you do all the above setups.clickJavaImage.xaml (7.9 KB)

1 Like

Hi @sambana_karunakar

You can use javastate attribute in your selector. They differ :slight_smile:

@loginerror yes I did this before but still no use it is detecting in either cases enabled and dsibaled state.

See if this attached project helps you :slight_smile: (20.7 KB)

Did you set up the way mentioned? It will work as you expect.

yes I did the setup, your xaml is working fine but I created another xaml as like you, it is not working for me

1 Like

what are you trying to do there? Same thing?
If yes then use state.

or you can list the things that you are doing, lets see what you may be missing