This Blog provides the details to set up Monkey Talk for iOS, to automate the iOS application.
You need to install MonkeyTalk iOS Agent into the application which you want to automate. For this, please follow the steps given below:
- Open your application’s project in Xcode.
- Duplicate your application’s build target by right-clicking on it and selecting Duplicate from the menu. A new target will be created called YourApp copy.
- Rename YourApp copy to something like YourAppMonkey.
- Add the downloaded MonkeyTalk lib to your project File > Add to “YourApp”… from the menu.
- When the dialog box appears, navigate to the directory where you unzipped the MonkeyTalk zip file, and select the MonkeyTalk iOS lib from pathToMonkeyTalkFolder/agents/iOS.
- Recursively creates groups for any added folders option. Note: It is up to you whether or not you want to Copy items into destination group’s folder.
- In the Add to Targets box, deselect YourApp and select YourAppMonkey.
- Click Add. The MonkeyTalk lib should now be visible in your project.
Configuring Libraries and Build Settings:
- Right-click on the YourAppMonkey build target, and select the Build Phases tab.
- On the Link Binaries with Libraries tab, you will need to add libsqlite3.dylib CFNetwork.framework and QuartzCore.framework if your application is not already using them. (These frameworks are required by the MonkeyTalk).
- XCode will have added references to the libMonkeyTalk.a
- On the Build Settings tab, scroll down to the Linking section and add to your Other Linker Flags: -all_load -lstdc++
- Choose your duplicated test target from the Scheme menu in Xcode and Run on the Simulator or Device.
- Goto New>>MonkeyTalkProject, New Project window should appear. Provide project name and click in “Finish” button.
- Right-click on the project folder and select New > Test. Provide File name and click on “Finish” button.
- Launch Android emulator and open your MonkeyTalk enabled application on the emulator.
- Click on the connection dropdown button on the tool bar and select “Android Emulator/Tethered Device”.
- If connection was successful, a message should appear in the console.
- Click “Record” on the MonkeyTalk IDE.