Skip to content

User Input Forwarding

hekra01 edited this page Oct 30, 2014 · 8 revisions

By default all user input (mouse, keyboard, touch) commands sent to WebDriver are constrained to Qt event loop

This is differents from events originating from a real device which are forwarded by the linux kernel and thus can reach the entire system, as shown below with the example of a customer premise equipment(CPE) receiving key events either from a remote control(RC) or from a Selenium client:
vnc

This feature enables WebDriver forwarding key events beyond Qt event loop in order to simulate remote control key presses

VNC Forwarding

Launch WebDriver with the --vnc-login=login:password@ip:port command line switch to specify a VNC server or port to redirect /session/:sessionId/key to. See main.cc (InitVNCClient) for full code sample.

Linux User Input Forwarding

Launch WebDriver with the --uinput command line switch to redirect /session/:sessionId/key to the User Input Device.

See main.cc (InitUInputClient) for full code sample.
Full list of command line switches [here](Command Line Switches)

Clone this wiki locally