Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Test to take the device screenshot
@Test
void readQRCode() {
MobileElement qrCodeElement = driver.findElement(By.id("com.example.qrcode:id/imageView"));
File screenshot = driver.getScreenshotAs(OutputType.FILE);
String content = decodeQRCode(generateImage(qrCodeElement, screenshot));
assertThat(content).isEqualTo("f3ce8d4d-074f-483f-9fd0-45c7947fd40c");
}
@eliasnogueira

This comment has been minimized.

Copy link
Owner Author

@eliasnogueira eliasnogueira commented Feb 11, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment