Forum Discussion

kflood's avatar
kflood
Occasional Contributor
3 years ago
Solved

Clicking on disabled buttons to verify if nothing happens returns error

Hello,

 

I'm trying to verify that if you click on a button that is visible but disabled nothing happens. If I use .ClickButton(), this will result in an error as the button is disabled. If I use .Click() I get a warning that the button is disabled(what I want) and that the action was performed incorrectly. What are some recommendations to work around this?

 

Thank you,

 

Kyle

  • this method would not be as functional,

    but you could do a property checkpoint on that button (property being .Enabled = False )

2 Replies

  • this method would not be as functional,

    but you could do a property checkpoint on that button (property being .Enabled = False )

    • kflood's avatar
      kflood
      Occasional Contributor

      Hi hkim5, I was hoping for a functional test, but I appreciate the input. I'm thinking I'll use the properties of the button to click the button within the coordinates of the parent. Easier said than done, but I'm hoping I can do a functional test without an error or warning. The verification step will be that a window does not pop up after this click. I'll let you all know how it goes.