Test camera image capture and QR/Barcode scanning
Live enables you to test image capture and QR/Bar code scanning from BrowserStack’s remote device camera. If your website has features such as check scanning, profile image capture, and QR/Bar code scanning, you can test your website using the Image Injection option on Live.
In this guide, you learn about:
- Supported image formats and device-browser combinations
- How camera is enabled on remote devices
- Testing camera image or QR code capture
- Troubleshooting
- Frequently asked questions (FAQs)
Supported image formats and device-browser combinations
- Images in the
.jpg
and.png
formats. - Image size not exceeding
10 MB
.
- Android device with Chrome browser
- Mac desktop with Chrome browser
- Windows Desktop with Chrome browser
How camera is enabled on remote devices
Camera testing is enabled through the browsers on remote devices such that instead of capturing an image manually, an uploaded image is used as input to the webcam. This simulates the action of clicking a picture and helps you test your scenarios.
Upload your image
- Log in to the Live dashboard.
- Select your device-browser combination, to start the test session.
- On the Live toolbar, click Image Injection.
- On the Image Injection prompt, click Upload new asset.
- On your system, select the file that you want to upload and click Open.
The Image Injection prompt displays the upload progress bar. Click Cancel on the prompt if you want to cancel the current upload and upload another image.
Test camera image or QR code capture
Prerequisite
- Log in to the Live dashboard.
- Select your device-browser combination, to start the test session.
- In the browser, open https://webcamtests.com/ to test your webcam.
- Click Test Webcam.
- Give the required permissions to the site.
The image that was uploaded earlier is seen.
- Log in to the Live dashboard.
- Select your device-browser combination, to start the test session.
- In the browser, open https://webqr.com/ and click Scan to scan your QR code.
- Give the required permissions to the site.
Troubleshooting
When using the Image Injection option on Live, you may see the following common errors.
Issue | Resolution | |
---|---|---|
Image upload failed | Ensure that your image is a supported image and try uploading the image again. | |
The website does not display the image. | Refresh your website. |
FAQs
-
Why am I not able to use the Image Injection feature on certain devices or desktop?
The Image Injection feature is currently available only for Android-Chrome, Mac-Chrome, and Windows-Chrome combinations.
-
Why can’t I upload a file from the website using Image Injection?
The Image Injection option on Live supports your website accessing the camera interactively. The camera uses the image uploaded by you and injects it to your website. Manual file input to your website is not supported on Live.
-
The image isn’t being displayed properly after scanning
- If you are testing a QR code/barcode scanner, ensure that you have sufficient padding.
- Ensure that the QR code is within the scanning frame.
- If you see color distortion at times after upload, it is a known issue and we are working to resolve it.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!