Search This Blog

Wednesday, 25 March 2015

Setup MonkeyTalk for Android and iOS

Below are the steps through which we can setup Monkeytalk Automation tool on windows and perform automation:-

  1. Download MonkeyTalk for gorilla logic website and unzip it. Download MonkeyTalk
  2. Open Eclipse and convert your project on "Aspectj" (need a plugin aspectj - for eclipse)- Once it get downloaded right click on your app,configure,Convert to aspectj.
  3. Then under your project folder structure search for "libs" folder if it's exist then ok else create it.
  4. Once it get done go to monkeytalk,agents,android,Monkeytalk jar file. Copy it and paste it under libs folder.
  5. Once it done click on "jar" file and right click on it,Aspectj tools,Add to aspect path.
  6. Then go to Androidmanifest.xml file where we have to add some permissions:-
    <Uses-permissions android:name="android.Permission.INTERNET/>
    <Uses-permissions android:name="android.Permission.Get_TASKS/>
  7. Go to project click on it,Right click,properties,Java Build Path,Check the "Aspectj Runtime Library,Ok.
  8. Run your application as a Android application.
  9. Open monkey talk.
  10. Create new project>>Create new script.
  11. Then set the android sdk path under prefences; MonkeyTalk,MonketTalk Prefences,Android SDK path,ok.
  12. Connect to emulator on monkeytalk.
              Now you will be able to record and play in MonkeyTalk.
Some start up code for your reference eg; if we have two textfield username and password and one button submit.
app.input("username").entertext("aakash");
app.input("password").entertext("jaiswal");
app.button("submit").tap();
 
-----------------------------------------------------------------------------------
----------------------------------------------------------------------------------- 

Below are the steps through which we can setup Monkeytalk Automation tool on Mac and perform automation
  1. Download MonkeyTalk and put it on desktop. Download MonkeyTalk
  2. Double click on Monkeytalk zip file.
  3. Open your project on xcode.
  4. Duplicate your project; Right click on Target>>Your project (duplicate only)  
  5. Rename it like (Monkey).
  6. Go to on the upper side of xcode select the app with a extension of copy; Manage schemes
  7. Also rename project + copy as (Monkey).
  8. Go to home Screen>>Add files>>Monkey (not any other app)>>Checkbox.
  9. Go to MonkeyTalk>>Agent>>iOS>>Lib monkey--- click on add.
  10. Add some more files
    • libs SQL 3.0 file
    • Quartz core
    • CF Network
  11. Now go to Build Settings--------------linking>>Other linker flags-- Add
    • -all_load -lstdc++
  12. Run the app and see the output.


How to edit the Accessibility Label
  1. Search for .xib files in Xcode under your project.
  2. Open each xib files.
  3. Once it get open go to 3rd option on left pannel.
  4. Go on Accessibility (Check the checkbox)
  5. write some generic name on label textbox.

No comments:

Post a Comment