0

I am trying to get a button's status to see if it is highlighted or not, but I cannot find such method in iOS UIAutomation, can anyone help?

I tried button().value(), but it return 1 if it is last accessed, and return null if it is not.

Avi
  • 21,182
  • 26
  • 82
  • 121

1 Answers1

0

UIAutomation exposes only a limited set of properties as described in their reference

Out of the box, you can check stuff like isEnabled, isVisible, etc

You can check this SO post for tweaking stuff How to check element properties in iOS gui automation?

Community
  • 1
  • 1
  • That's a good idea. I manually set status by adding cell.accessibilityValue="xxx" in source code, and then call button.value() to get the status in JavaScript. – Glenn Xian Sep 23 '13 at 23:34
  • basically, you can manually set any value to accessibilityValue in source code, and the use it in JavaScript by .value() property. – Glenn Xian Sep 23 '13 at 23:37