Feedback - 2/3/2020, 1:48:05 PM


#1

Question: How to automate using Ranorex WebtestIt the screen in https://cestest.photobutler.com/#/selfie that involves using the PC camera? What I actually wanted to do is have the automation script skip that camera taking action and instead have it read the picture from a file that I previously saved in the Downloads directory, say Downloads/AndyPic1.JPG. I couldn’t find any information in the help section about this. If this functionality is indeed documented somewhere, please direct me to it. Thank you very much!

-----John.

SentryId: d5de291ab3874f9eb5a5cc42ecf75b7e

Email: [email protected]


unlisted #2

#3

Hello John :slight_smile:
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).