Error: UnsupportedOperationError: pointer movements relative to viewport are not supported in bridge mode

6/11/2019

I have selenium Hub as a service on Cluster Kubernetes and I start testing remotely using selenium side runner. Unfortunately when I try to run a test with terminal (using Ubuntu), I get the following error:

enter image description here

UnsupportedOperationError: pointer movements relative to viewport are not supported in bridge mode

at executeLegacy (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:1129:17) at Actions.perform (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:971:16

if I try to start the tests from selenium ide, everything works well. What can the error depend on?

Can you help me? Thank you in advance.

Best regards

-- Biagio Antonucci
kubernetes
selenium
selenium-webdriver
webdriver
webdriver-w3c-spec

2 Answers

6/11/2019

This error message...

  UnsupportedOperationError: pointer movements relative to viewport are not supported in bridge mode
    at executeLegacy (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:1129:17)
    at Actions.perform (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:971:16

...implies that the pointer movement which happens relative to the viewport is not supported while working within a canvas in bridge mode.

As per the documentation in Clause 6 of Class Actions:

For W3C actions, move offsets relative to a WebElement are interpretted relative to the center of an element's first client rect in the viewport. For legacy actions, element offsets are relative to the top-left corner of the element's bounding client rect. When translating actions to the legacy protocol in bridge mode, an extra command must be inserted to translate move offsets from one frame of reference to the other. This extra command conributes to the overall latency issue.

You can find a detailed discussion in Is it possible to programmatically determine whether W3C action commands are used?

This is a known issue with Selenium and is being tracked through Not correctly move pointer to the position inside of element in bridge mode.


ChromeDriver - Implement Actions API

The currently released ChromeDriver 76.0.3809.12 contains the implementation of Actions API.

----------ChromeDriver 76.0.3809.12 (2019-06-07)----------
Supports Chrome version 76
Resolved issue 1897: Implement Actions API [Pri-1]

Link to Issue 1897: Implement Actions API

Switching to ChromeDriver 76.0 will solve your issue.

-- DebanjanB
Source: StackOverflow

2/27/2020

It could be due to selenium version. I faced the same issue and upgraded selenium version to 4.0.X.

-- Chandru
Source: StackOverflow