Appium - Camera scanning bank cheque for deposit

Hi there

I’m automating a banking application in which I have two controls of type XCUIElementTypeImage. As the user clicks on XCUIElementTypeImage camera control is opened and asks for cheque to scan. Please note that this test would be requiring front side of cheque scanning and backside with two different XCUIElementTypeImage controls separately.

Since it cannot be accomplished in real time scenario while tests are executing nightly and on Simulators, can I just set these image controls to pre-captured images for my tests (essentially by-passing scanning step).

Same challenge is with Android platform.

Please advise.

Since it cannot be accomplished in real time scenario while tests are executing nightly and on Simulators, can I just set these image controls to pre-captured images for my tests (essentially by-passing scanning step).

Most likely not unless the application itself has some backdoor in it. Such backdoor can be done via broadcasting, for example.

Thanks. Can we do it by using Espresso driver (for Android)