Apple script for extracting a text from the mac application

Joined
Sep 2, 2015
Messages
4
Reaction score
0
Is it possible to check the change in texts in Mac application's UI using apple Script? I need to create an apple script for the following scenario - click on the connect button only when the status changes to "connected", the status will be displayed on the UI. Can we write script for checking with the text being displayed on the UI? expecting an reply as early as possible.
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,098
Reaction score
500
Hello and welcome...sorry we haven't responded sooner.

I am a little confused about what you are trying to accomplish. Can you elaborate on the scenario a little bit?

-Are you writing a new application?
-Are you trying to script the Finder or a specific application?
-Where is the connect button/connected status you are describing?
-From where are you trying to extract the text?

C
 
Joined
Sep 2, 2015
Messages
4
Reaction score
0
Hi Corey, thanks for your response.

I have a Mac application for which i need to write apple script for UI automated testing.

There is a tab group in the window of the application which contains many static texts and text fields. I don't know how to access these static texts to get the value of the String it contains.

1. Consider this scenario, i am clicking a button "Connect" in the application, there will be change in the string being displayed on the tab as "Connecting" and then finally turns into "Connected". This string value is stored as a AXStaticText. I need to know whether it is possible to get the value of this static text which is currently a AXChildren to the AXTabGroup using apple script alone? Currently i am trying to use shell script along with apple script to get the connection status with the help of the log file.

2. And also i want to know how to make a click action on a child element under a tab group. I am having a AXTabGroup under which it contains many static texts and buttons. How can i make click actions for these children?
I am not able to script for generating actions for such children elements using apple script.


AXChildren, AXTabGroup, AXStaticText are termed based on the analysis using Accessibility inspector.

I need a solution for question number - 2 at the earliest.
Thanks.
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,098
Reaction score
500
OK...thanks for the additional information.

Unfortunately, that scenario is outside my knowledge and experience. The best suggestion I can make is to post your question(s) at these discussion forums:

Apple Developer Forums
MacScripter

I wish I could lend a hand, but I have never done any application/software development, or anything but very basic scripting. Hopefully they can help you out.

C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top