Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reads the image src attribute and decode it using Zxing
@Test
void readQRCodeFromURL() {
String qrCodeFile = driver.findElement(By.id("qr")).getAttribute("src");
// get the qr code content and assert the result
String qrCodeResult = decodeQRCode(qrCodeFile);
assertThat(qrCodeResult).isEqualTo("c72a0de5-eba3-4bf0-bde2-fc709e71df29");
}
@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