Created
February 11, 2021 20:57
-
-
Save eliasnogueira/ac9e3e281f05c7158daeaa6b5be88b74 to your computer and use it in GitHub Desktop.
Reads the image src attribute and decode it using Zxing
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
@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
The full code can be found at https://github.com/eliasnogueira/selenium-read-qrcode