MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / ScrollToElement

Method ScrollToElement

dotnet/src/webdriver/Interactions/Actions.cs:519–524  ·  view source on GitHub ↗

If the element is outside the viewport, scrolls the bottom of the element to the bottom of the viewport. Which element to scroll into the viewport. A self-reference to this . If is null.

(IWebElement element)

Source from the content-addressed store, hash-verified

517 /// <returns>A self-reference to this <see cref="Actions"/>.</returns>
518 /// <exception cref="ArgumentNullException">If <paramref name="element"/> is null.</exception>
519 public Actions ScrollToElement(IWebElement element)
520 {
521 this.actionBuilder.AddAction(this.GetActiveWheel().CreateWheelScroll(element, 0, 0, 0, 0, duration));
522
523 return this;
524 }
525
526 /// <summary>
527 /// Scrolls by provided amounts with the origin in the top left corner of the viewport.

Calls 3

GetActiveWheelMethod · 0.95
CreateWheelScrollMethod · 0.80
AddActionMethod · 0.45