geckodriver icon indicating copy to clipboard operation
geckodriver copied to clipboard

moveToElement in actions fails if the element is larger than viewport

Open Kadarkarai opened this issue 4 years ago • 2 comments

System

  • Version: geckodriver version : 0.29
  • Platform: Windows Server 2008 R2 Enterprise
  • Firefox: 84.02
  • Selenium: 3.13.0

Testcase

Used the Actions to scroll through the page and following is the code i have used

Actions actions = new Actions(driver); actions.moveToElement(Element); actions.perform();

It shows the exception as MoveTargetOutOfBoundsException

The same code is working in chromedriver (chrome browser) and the element is present in the page

Stacktrace

org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: (1104, 744) is out of bounds of viewport width (1280) and height (621)
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
System info: host: '******g', ip: '***.**.**.***', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 84.0.1, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20201221152838, moz:geckodriverVersion: 0.28.0, moz:headless: false, moz:processID: 16108, moz:profile: C:\Users\selvamk\AppData\Lo..., moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, platformVersion: 6.1, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
Session ID: 3560cefa-600a-4a87-9af2-341d81b1697e

Kadarkarai avatar Jan 19 '21 11:01 Kadarkarai

and to chime in, works find in Edge as well. Wow, Jan 19, 2021? Is gecko officially dead?

karlkras avatar Aug 14 '23 20:08 karlkras

As it looks like this slipped through the radar.

Can someone please provide a trace level log which shows that problem, or a small testcase? Note that per spec the in-view center point of the target element will be used for the move action, so I won't expect a problem.

Thanks

whimboo avatar Aug 15 '23 09:08 whimboo