Scroll-To

Scrolls until an element with a matching locator value is visible

Powershell

Scrolls until an element with a matching locator value is visible. Note that the element should already be loaded. Please use the ScollDown-To or ScrollUp-To commands if the application generates the list dynamically.

Syntax

Scroll-To [[-sessionId] ] [[-elementId] ] [[-marked] ] [[-xpath] ] []

Parameters

name description
sessionId (Optional) The identifier of the session to route the command to.
elementId The identifier of the scroll view.
marked (marked locator) The value for the marked locator
xpath (xpath locator) The value for the xpath locator

Examples

Scroll-To -elementId $scrollView -marked "John"

C#

Declaration

void Quamotion.WebDriver.Client.AppDriver.ScrollTo(this AppDriver appDriver, IWebElement element, string xpath)

Arguments:

type name description
OpenQA.Selenium.IWebElement element The scroll container containing the element to which to scroll to
OpenQA.Selenium.IWebElement xpath The xpath defining the element to which to scroll to

Examples

driver.ScrollTo(scrollContainerElement, obButtonXpath);

Comments

This function only supports app automation at this moment. Use ScrollUpTo or ScrollDownTo when the element is not loaded when scrolling starts.