-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take screenshots of the app with Detox #6850
Comments
https://wix.github.io/Detox/docs/guide/taking-screenshots async function setDemoMode() {
if (device.getPlatform() === 'ios') {
execSync(
'xcrun simctl status_bar "iPhone 11" override --time "12:00" --batteryState charged --batteryLevel 100 --wifiBars 3 --cellularMode active --cellularBars 4'
);
} else {
// enter demo mode
execSync('adb shell settings put global sysui_demo_allowed 1');
// display time 12:00
execSync('adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200');
// Display full mobile data with 4g type and no wifi
execSync(
'adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype 4g -e wifi false'
);
// Hide notifications
execSync('adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false');
// Show full battery but not in charging state
execSync('adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100');
}
} |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do the magic status bar stuff, make as few changeable things as possible, and ideally generate diffs between screenshots too.
The text was updated successfully, but these errors were encountered: