Created
March 14, 2019 02:15
-
-
Save chan-bo/cd1bd20402ec28389bbc64cb20700421 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(JUnit4::class) | |
class AutomateScreenshotsTest { | |
@Before | |
fun setUp() { | |
ActivityScenario.launch(MainActivity::class.java) | |
Screengrab.setDefaultScreenshotStrategry(UiAutomatorScreenshotStrategy()) | |
} | |
@Test | |
fun captureScreen() { | |
// Delay 500 millis for app launch to main screen | |
Thread.sleep(500) | |
Screengrab.screenshot("main_screen") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment