Skip to main content

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

  • 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.

Note: You cannot capture images using the Camera app on the remote devices.

Upload your image

  1. Log in to the Live dashboard.
  2. Select your device-browser combination, to start the test session.
  3. On the Live toolbar, click Image Injection.
  4. On the Image Injection prompt, click Upload new asset.
  5. 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

Upload your image

Note: You can upload only one image at a time.
  1. Log in to the Live dashboard.
  2. Select your device-browser combination, to start the test session.
  3. In the browser, open https://webcamtests.com/ to test your webcam.
  4. Click Test Webcam.
  5. Give the required permissions to the site.

The image that was uploaded earlier is seen.

  1. Log in to the Live dashboard.
  2. Select your device-browser combination, to start the test session.
  3. In the browser, open https://webqr.com/ and click Scan to scan your QR code.
  4. 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






Thank you for your valuable feedback

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy