So, as I can understand, the web application that you try to automate is taking a selfie or scanning the photo and matches & filters out photos based on the scanned one?
What you could do is simply change the URL to the step where the app is “reading the picture from a file” as you mentioned, if there is a specific URL that covers that step.
But, there might be some issues performing file download/uploads using selenium. When downloading a file, the download dialog is native in all browsers without the possibility for Selenium to control that dialog, it stays open and the test hangs.
In order to upload a file, you need to use “send keys” approach at the input element where type=“file”. For more info about this action, please hop over to this StackOverflow thread
Another way is to implement 3rd party software like AutoIT that can handle all kinds of dialogs, but this approach is a little more complicated and makes a test script dependent on your local filesystem where the AutoIt script is located.
Back to the “have the automation script skip that camera taking action and instead have it read the picture from a file”, you would have to know a way to do this manually and then make a script out of it. One way is to change the URL, perhaps there is another way of doing this that you could provide us with so that we can analyze the “issue” further?
Thank you for your feedback!
(personal email sent out also).