selenium icon indicating copy to clipboard operation
selenium copied to clipboard

IeDriver do not scroll into element

Open Nawakator opened this issue 8 years ago • 6 comments

Meta -

OS: Windows 7/10 Selenium Version: Selenium 3.11.1.1 Browser: Internet Explorer 11

The Ie driver does not scroll into view element anymore (Removed GetLocationOnceScrolledIntoView from InputManager.cpp).

It seems linked to W3C compliant, but I really do not understand this. Internet Explorer will never evolve and the new feature has not applied into the other drivers. Since 3.5.x they are many regressions that make the test between Ie and the other browsers not compatible. We have to update all our test by adding some if browser.equals(...) to be able to run the tests.

Also the scripts may don't work if we change the resolution!

Browser Version: Ie 11 (Win 64b)

Expected Behavior -

If a web element is outside the view, the precedents versions scroll into it.

Actual Behavior -

Now we have an exception MoveTargetOutOfBoundsException

Steps to reproduce -

You can use the tests create by g04k4 (selenium-tests.zip) From https://github.com/SeleniumHQ/selenium/issues/5024

Nawakator avatar Mar 21 '18 07:03 Nawakator

Does the behavior of current versions of the IE driver match that when running against recent versions of Firefox using geckodriver?

jimevans avatar Mar 21 '18 11:03 jimevans

Indeed, the beahvior seem to be the same in Firefox not in Chrome Also same beahvior with Edge

Nawakator avatar Mar 21 '18 13:03 Nawakator

So whe have to implement a scroll into view before call validate, moveto, click on WebElement ?

Nawakator avatar Mar 21 '18 13:03 Nawakator

@Nawakator I expect that chromedriver will pick up the same behavior once its W3C compliant implementation is released (soon, certainly before the end of the year).

So yes, if you’re using the Actions API to manipulate elements, you’ll need to scroll the target into view first. The JavaScript scrollIntoView function can be useful here. Note that this change has no bearing on the click() and sendKeys() methods of the WebDriver interface. They will still attempt to scroll the target element into view automatically.

jimevans avatar Mar 21 '18 15:03 jimevans

@Nawakator If you mean Actions, follow this issue: https://github.com/w3c/webdriver/issues/1005, this new feature will be implemented in drivers only after fixing this spec issue.

If you faced scrolling issues with "regular" (not Action based) sendKeys or click operations please provide a reproduction scenario.

barancev avatar Mar 22 '18 06:03 barancev

Closing the issue as there is no reproduction scenario provided.

barancev avatar Apr 05 '18 19:04 barancev