I'm looking for approach/solution on how to scan a bar code using Appium. Is it possible through emulators? or do I need real device for this use case?

1 Answer 1


Barcode scan using Appium :

  • This is one of the limitation of Automation I would say to automate scenarios with scanner or camera

  • Simply because it has some infrastructure & application related challenges

Possible work around [but not best practice] :

  • If performing tap on button [on mobile + from targeted app i.e. app which we are automating using appium] leads to open camera instead of redirecting user on diff application then we can think about some work around

  • We can automate barcode scanner if we have provision in targeted application to fetch barcode from gallery/mobile images instead of actual scan. This might be a relative close match

  • If we have only option to open inapp camera into targeted application, then we should give a rough try by keeping phone in such a way that when camera gets open and functional then barcode should have placed in front & in ideal position of scan

  • Go for those work around when you do not have any other option & this is blocking you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.