The script in the automated test for iOS has the ability to record, which gives us a lot of convenience in testing. We can create the code by recording, and then through the changes to the generated band can be changed to automatically test the code, generally we can add the delay function.
Or is it using recipes (Apple's official test project) This project as a test project, and then add the selection uiautomation, into the scripting interface,
1, click the Red button under the script, and then enter the simulator to operate the phone application, you can generate a total of JS code. Then click on the "Stop" button.
Generate the corresponding code as follows:
On the real machine and the simulator is the same test, as long as the developer to verify it.
2, there may be a lot of code will not see, we are because of the color problem, we can copy to the outside of the editor to tidy up and then to copy it in.
After finishing the code:
Then click the Run button. Can be tested by displaying the appropriate operating conditions.
You can see that there are still some errors, we need to modify the correct knowledge, and the results of testing in this process is consistent, feedback to the development engineer and so on, so that it is conducive to development.
After the test succeeds, the error red flag will not appear.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Recording of the UIAutomation script in iOS