Swift xcode feature for UI Testing, handy way to write your UI Testing Code:: RECORD
This recording feature for UITest is not known and not well used for most of cases. This feature provided by xCode doesn’t work quite well but it’s good to know this feature exists. Especially, it helps find you the accessibility identifier.
How to use UITest Record Feature
When you create UI Test for your project, you will see this button in the bottom-left corner. Red Circle there is for recording your UI Test. If you press the button, it will launch your application in the simulator and record it and write code for you. Note that it won’t appear in your Unit Test
. This only exists on UITest
.
Most Common Usecases
Sometimes, there would be an UI element that you don’t have any idea of how to access it. As for an example, how do I select the second row of ListView? This recording feature gives you an idea when you click the second row of ListView.
Conclusion
- XCode provides you with handy feature called recording. This writes code automatically as you interact in the app.
- XCode UITest Recording doesn’t work well but it can give you an idea of how to write code for your UITestings!