org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: Element cannot be scrolled into view:http://localhost:2990/jira/servicedesk/agent/TEST/sla# Command duration or timeout: 27 milliseconds Build info: version: '2.22.0', revision: '17048', time: '2012-05-29 14:59:54' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.7.0_60' Driver info: driver.version: RemoteWebDriver Session ID: 857fcc2b-f50a-7947-9a72-81c67efa6936

Atlassian JIRA | Dick Wiggers [Atlassian] | 2 years ago
  1. 0

    When running tests against Service Desk, I often get a 'Cannot scroll element into view' error, caused by an SD dialog that's too big for my browser window. Use case: Adding calendars in ServiceDesk in webdriver test. Running test on local machine with Firefox. Firefox defaults to a ~800x800 screen. As soon as the calendars are added, the test will attempt to click closeButton. The button is off screen (see screenshot). Apparently there's an {{overflow: hidden}} or similar somewhere, preventing Selenium to scroll towards the button. I have seen this behaviour on multiple dialogs in ServiceDesk. My workaround is to quickly go to Firefox and resize the screen before the tests are at the calendar dialog. This is annoying. While it might be a minor issue, I feel that this should be addressed. Is this a known issue? And if so, are there plans for fixing this and/or does a workaround exist? {code} SlaPage slaPage = jira().goTo(SlaPage.class, PROJECT_KEY); CalendarDialog calendarDialog = slaPage.editCalendars(); CalendarEdit calendarEdit = calendarDialog.addCalendar(); calendarEdit.name(SD_CALENDAR_NAME_1); calendarEdit.save(); calendarEdit = calendarDialog.addCalendar(); calendarEdit.name(SD_CALENDAR_NAME_2); calendarEdit.save(); calendarDialog.doWait(); calendarDialog.dialogClose().click(); {code} {noformat} org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: Element cannot be scrolled into view:http://localhost:2990/jira/servicedesk/agent/TEST/sla# Command duration or timeout: 27 milliseconds Build info: version: '2.22.0', revision: '17048', time: '2012-05-29 14:59:54' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.7.0_60' Driver info: driver.version: RemoteWebDriver Session ID: 857fcc2b-f50a-7947-9a72-81c67efa6936 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:458) at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:244) at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:77) at com.atlassian.pageobjects.elements.WebDriverElement.click(WebDriverElement.java:184) at it.com.atlassian.addon.connect.autodispatch.AutodispatchTestCase.setUpBeforeClass(AutodispatchTestCase.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) {noformat}

    Atlassian JIRA | 2 years ago | Dick Wiggers [Atlassian]
    org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: Element cannot be scrolled into view:http://localhost:2990/jira/servicedesk/agent/TEST/sla# Command duration or timeout: 27 milliseconds Build info: version: '2.22.0', revision: '17048', time: '2012-05-29 14:59:54' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.7.0_60' Driver info: driver.version: RemoteWebDriver Session ID: 857fcc2b-f50a-7947-9a72-81c67efa6936

    Root Cause Analysis

    1. org.openqa.selenium.interactions.MoveTargetOutOfBoundsException

      Element cannot be scrolled into view:http://localhost:2990/jira/servicedesk/agent/TEST/sla# Command duration or timeout: 27 milliseconds Build info: version: '2.22.0', revision: '17048', time: '2012-05-29 14:59:54' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.7.0_60' Driver info: driver.version: RemoteWebDriver Session ID: 857fcc2b-f50a-7947-9a72-81c67efa6936

      at sun.reflect.NativeConstructorAccessorImpl.newInstance0()
    2. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      4 frames
    3. Selenium
      RemoteWebElement.click
      1. org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
      2. org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
      3. org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:458)
      4. org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:244)
      5. org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:77)
      5 frames
    4. com.atlassian.pageobjects
      WebDriverElement.click
      1. com.atlassian.pageobjects.elements.WebDriverElement.click(WebDriverElement.java:184)
      1 frame
    5. it.com.atlassian
      AutodispatchTestCase.setUpBeforeClass
      1. it.com.atlassian.addon.connect.autodispatch.AutodispatchTestCase.setUpBeforeClass(AutodispatchTestCase.java:129)
      1 frame
    6. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3 frames
    7. JUnit
      JUnitCore.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      4. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      5. org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      6. org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      7. org.junit.rules.RunRules.evaluate(RunRules.java:20)
      8. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      9. org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      9 frames
    8. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
      1 frame