Is there a reason you set this property InternetExplorerDriver.REQUIRE_WINDOW_FOCUS
to true
? This is why IEDriver asks IE to take control your pointer.
To fix it, simply remove it or set it to false. This was introduced in 2.28.0.3
, here's the quote from CHANGELOG:
Introduced the "requireWindowFocus" capability into the IE driver. When used in conjunction with the "nativeEvents" capability, the driver will attempt to bring the current IE window to the foreground before executing a mouse or keyboard event.
Also, when the requireWindowFocus capability is set to true, advanced user interactions will now use the Windows SendInput() API to execute the interactions. To enable this behavior, set the value of the
requiresWindowFocus capability to "true" when creating an instance of the IE driver. The default for this new capability is "false". This functionality is currently considered extremely experimental; use at your own risk.