Can anyone suggest a good method to use when you want to check if a element is NOT clickable.
In one of my scripts, I'm trying to verify that a button clickable until a certain action is taken on the screen (like entering text in a field or selection a radio button option)
-
Locating it and checking if it is clickable does not work? Or wait for ExpectedConditions clickable is false?– Peter M. - stands for MonicaMay 16, 2016 at 18:15
-
I'll give that a try and see if that'll work for me.– TscottMay 16, 2016 at 20:29
Add a comment
|
2 Answers
Assert.IsFalse(button.Enabled);
-
-
would you please give some more information around this answer? thanks!– MalachiAug 4, 2016 at 15:59
It's hard to check if the button is clickable (working) or not without clicking on it.
For your case, so you can use IsDisplayed and IsEnabled to compare status before and after the changes happen.