Hi,
when the apply button is clickable and not clickable, they both have the same xpath. I will like to know how this can be handled. An example of code for the both of them is down below i removed some of it for privacy reasons
To answer your problem you’ll have to look at the html for that button (and maybe the surrounding elements) to figure out what is triggering the state change from not clickable to clickable, it can vary depending on your application’s developers, here are some common methods used:
the button has a “disabled” attribute in the button html tag
the button is a input html tag with a type button has a “disabled” attribute in the input html tag
the button (input/div/span/link styled as a button) has a class that gets removed when the button becomes active
the button (input/div/span/link styled as a button) parent/grandparent element has a class that gets removed when the button becomes active
Given you didn’t show the html of the button in both states we have no way of knowing what the app developer did, hopefully i’ve given you the necessary clues to figure it out