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"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
The full code can be found at https://github.com/eliasnogueira/selenium-read-qrcode