Unable to touch screen / inject event error

Mobile Testing, Android App Testing.
steven.fitzpatrick
Posts: 13
Joined: Wed Oct 28, 2015 3:54 pm

Unable to touch screen / inject event error

Post by steven.fitzpatrick » Wed Oct 28, 2015 4:03 pm

I'm currently attempting to test video playback on an Android application that requires me to press the screen in order to ensure the video controls menu is visible before I can press the pause/play button.

When I attempt to 'touch' any element on the page through Ranorex the test fails & I get an "Inject_Events" permission error telling me that "Injecting to another application requires INJECT_EVENTS permission".

Is there anyway round this? Or is it possible to simply 'touch' the screen at a particular set of coordinates, ones not linked to a repo element?

Thanks

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: Unable to touch screen / inject event error

Post by tvu » Thu Oct 29, 2015 5:26 pm

A snapshot of your app would be helpful. What element are you trying to perform the touch action?

I usually do a center touch on the container type element representing the Video Player to make the control menu visible.

Hope that helps.

steven.fitzpatrick
Posts: 13
Joined: Wed Oct 28, 2015 3:54 pm

Re: Unable to touch screen / inject event error

Post by steven.fitzpatrick » Fri Oct 30, 2015 10:14 am

Sadly that didn't help. I get the inject event error regardless of what element I attempt to touch, even on the video containers.

I've added some attachments, one of the elements available on the device when I attempt to validate them and one of the error I get when I target any of these elements with a touch gesture.

I believe the issue is down to the fact we have use a third party video player within our app but I'm not sure why I'm unable to touch the screen since the play/pause button can be targeted when the menu is already showing.
This also seems to work fine with the iOS version of the application.

Anyone have any other ideas? I'm completely lost at this point.
You do not have the required permissions to view the files attached to this post.

steven.fitzpatrick
Posts: 13
Joined: Wed Oct 28, 2015 3:54 pm

Re: Unable to touch screen / inject event error

Post by steven.fitzpatrick » Fri Oct 30, 2015 10:16 am

Ranorex support have been in touch. Hopefully I can get a workaround & I'll update here if I do.

Cheers.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Unable to touch screen / inject event error

Post by Support Team » Thu Nov 05, 2015 4:48 pm

Hello,

Our development department analyzed the issue.
Unfortunately, it is not possible to provide a solution or a workaround for that issue.

It seems like the video stream is started from a system process, which then becomes the active window.
The instrumented app process then tries to inject events into a process it does not own.
Ranorex is not allowed to inject events into processes which are owned by the system process.

Thank you for your understanding.

Regards,
Johannes

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: Unable to touch screen / inject event error

Post by tvu » Fri Apr 21, 2017 10:34 pm

Hi steven.fitzpatrick,

I know support says there is no workaround, but did you ever figure this out? This wasn't an issue for me on iOS, but I just started automating our Android app and now I am facing the same problem.

Thanks.