You can take a screenshot or record a video of the simulator window using the xcrun command-line utility. To record a video, execute the following command
xcrun simctl io booted recordVideo <filename>.<file extension>.
xcrun simctl io booted recordVideo appvideo.mov
control + c to stop recording the video. The default location for the created file is the current directory.