Record button disabled in Xcode UI Test Target
- Click on 6th button from top of the left pane - Show the test navigator
- Right click on the UI tests, then click on "Enable ... "
Then you can record.
Make sure you are in the correct XCTestCase subclass file.
After researching for a time, I found that I was all the time in a extension file (I'm been ordering the flows in extension files). So when I opened the main XCTestCase subclass file (like "YourAppUItests") the record test button has been enabled.
Record button only gets enabled within a function body.
The function name must start with
test
. LiketestExample()
.After changing the name of the function wait for a few seconds for the run icon to appear in the gutter.
Now the record button should appear.