Go Back   The macosxhints Forums > OS X Help Requests > AppleScript



Reply
 
Thread Tools Rate Thread Display Modes
Old 07-01-2012, 03:21 PM   #1
mayanks
Prospect
 
Join Date: Jul 2012
Posts: 2
Regarding Automation scope on Mac....

Hi,

Actually i want to get some knowlege about automation scope on Mac.
Say i have native Mac application with thousands of test cases do we have scope to automate. I have heard multiple things like applescripts, automator etc but dont know will it work with complex application?

If yes, what is the best approach?

Lets start with simple thing.. That i have to launch a app and on launch of app i will get login pop up and i have to enter user name nd password and then click on login dialog. I want to do this through any type of scripting not with any record playback thing...

Please help...

I am Using iMac, Mac OS X (10.7)

Thanks in advance
mayanks is offline   Reply With Quote
Old 07-01-2012, 07:33 PM   #2
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,940
First step is to read lots of documentation. If you are doing a lot of this, you should buy one of the books on AppleScript.
And read on Apple's site about "GUI scripting".
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Old 07-02-2012, 01:09 AM   #3
mayanks
Prospect
 
Join Date: Jul 2012
Posts: 2
Hi,
Thanks for support.

Before going to more details of anything specific like applescript i want to do feasibility study by implementing some simple scenario.

Like I mention before i want to do following :
1. Launch the App.(Its not default(apple) application, it is third party application).
2. On launch we will get login popup in which there is two field user name and password. I want to enter user name and password through script.
3. After that i want to click on login button on login page to get user logged in.

I tried a small script to enter user name.

tell application "PhotoGuide"
activate
tell application "System Events"
set the UI element to "Account Name :"
keystroke "Mayank"
end tell
end tell

I am getting below error :

Can’t set «class uiel» to "Account Name :". Access not allowed.

Please tell, what is the problem or is it feasible to automate any third party application with applescript ?

Thank you very much....

Last edited by mayanks; 07-02-2012 at 01:15 AM.
mayanks is offline   Reply With Quote
Old 07-02-2012, 06:31 AM   #4
benwiggy
League Commissioner
 
Join Date: Aug 2006
Posts: 5,039
The extent of AppleScript in third-party apps depends entirely on what the developer has included. Some third-party apps have no AppleScript support; some only provide the minimum (open, close quit, print); some provide detailed extensive scripting.

You can get an idea of how much AppleScript support there is by opening the AppleScript Dictionary of the app in the Script Editor.

Similarly, Automator Actions have to be created by the developers for third-party apps.

As for your particular error, I'm not sure. Perhaps it's a security feature?
benwiggy is offline   Reply With Quote
Old 07-07-2012, 07:56 PM   #5
sojourner
Major Leaguer
 
Join Date: Apr 2010
Posts: 324
The discussion in another thread might be of use.
__________________
see a problem; solve a problem.
sojourner is offline   Reply With Quote
Reply

Tags
automation, testing

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.