Testing
iOS Simulator
If you want to test on iOS simulator, open Simulator, on the top screen, navigate to Device -> Trigger Screenshot. This is applied to iOS 14+.
Android Emulator
If you want to test on Android Emulator, you can create an emulator with Google Play Service API supported. Then go to Play Store and download any third-party screen record and screenshot app based on your need (XRecorder, AZ, etc....) for testing.
Android 12+ emulator already provided screenshot and screen record function in Quick Settings Panel.