Virtual Touch Events for XTEST

Prakash P prakash.guru at gmail.com
Wed Feb 22 06:55:07 UTC 2017


​​
Hi,

I want to create an virtual test environment for my web application. I got
it working with the help of xvfb and running google-chrome inside it. I am
able to send keytrokes and mouse events through the xdotool
http://www.semicomplete.com/projects/xdotool which internally uses XTEST.

I do have some test cases where I have to send touch events to the chrome
browser. Unfortunately the xdotool does not support sending touch events. I
am unable to find any info about whether XTEST supports touch events or not.

I tried creating a "virtual touch device" using user mode input subsystem
"uinput" which works only on the logged in x-org session. I am able to send
touch events [Code attached in the bottom].

But the Xvfb dont care about the virtual uinput devices the "xinput list"
revealed only the following.

>sudo DISPLAY=localhost:2.0 xinput list





*⎡ Virtual core pointer                          id=2    [master pointer
(3)]⎜   ↳ Virtual core XTEST pointer                id=4    [slave
pointer  (2)]⎜   ↳ Xvfb mouse                                id=6
[slave  pointer  (2)]⎣ Virtual core keyboard
id=3    [master keyboard (2)]    ↳ Virtual core XTEST
keyboard               id=5    [slave  keyboard (3)]    ↳ Xvfb
keyboard                             id=7    [slave  keyboard (3)]*


I also tried the virtual uinput device with "Xorg X11 dummy video driver"
https://xpra.org/trac/wiki/Xdummy which is also not detecting the my
"virtual touch device" ( I ran the xorg as non root).


I am struck. I don't know where to proceed further.
Is there any other options available? Do I have to implement something else?

Any help would be greatly appreciated.

Thanks,
Prakash


Notes,
1. Starting X virtual frame buffer -  "Xvfb :2 -screen 0 1600x900x24"
2. virtual touch device uinput code -
https://drive.google.com/open?id=0B2lQr8WlvKmzZjhJOHB0b0x4ZGc   (with the
help of  http://thiemonge.org/getting-started-with-uinput )
3. For the xvfb - I used CentOS 7.3 with Xorg -  1.17.2, pixman 0.34.0,
kernel -3.10.0
4. For the x dummy driver - I used ubuntu 16.10 with Xorg 1.18.4, pixman -
0.33.6 , kernel -4.10.


-- 
Anyone who has never made a mistake has never tried anything new.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170222/62d312fa/attachment.html>


More information about the xorg-devel mailing list