0

I have used Accessibility which will allow me to access other apps and UI elements as well. I have used UIElementInspector sample code from Apple's site.

Now if i have

<AXApplication: “Sample_mac_application”>
 <AXWindow: “Sample_mac_application”>
  <AXButton: “Button Press”>

Attributes:
   AXRole:  “AXButton”
   AXRoleDescription:  “button”
   AXHelp:  “(null)”
   AXEnabled:  “1”
   AXFocused (W):  “0”
   AXParent:  “<AXWindow: “Sample_mac_application”>”
   AXWindow:  “<AXWindow: “Sample_mac_application”>”
   AXTopLevelUIElement:  “<AXWindow: “Sample_mac_application”>”
   AXPosition:  “x=468 y=254”
   AXSize:  “w=134 h=32”
   AXTitle:  “Button Press”
   AXIdentifier:  “_NS:51”

Actions:
   AXPress - press

How to perform Action press on application. Is there any way to do it? CGWindow.h will give information title You can use CGWindowListCreateDescriptionFromArray(). See CGWindow.h This gives you an array of dictionaries. The following information will probably be useful to you. position and size: kCGWindowBounds name: kCGWindowName

I want to perform click, set text operations on elements whose AXRole, AXtitle, AXWindow already known to me using UIElementInspector. I want Xcode cocoa application code not apple script.

leppie
  • 115,091
  • 17
  • 196
  • 297
Shelar
  • 46
  • 7

1 Answers1

0

I think you're looking for the accessibilityPerformPress method?

geowar
  • 4,397
  • 1
  • 28
  • 24
  • Hi I have found appium-for-mac automation framework which I can use externally and perform click, set text operations on elements – Shelar Jan 20 '15 at 15:54