Skip to main content

SetWebAutoScroll

Description

Use this command to determine behavior of scrolling to invisible elements on a webView.

info

webAutoScroll is not supported for elements with at least one ancestor containing the transform property. This is because that property can change the coordinates of elements on the web page. To enable webAutoScroll, remove the transform property from the elements and its parents.

Parameters

NameTypeDescription
AutoScrollBoolean* True - Scroll the webView when searching for invisible objects.

* False - Scroll the webView when searching for invisible objects.

Usage

When setting SetWebAutoScroll to False, the result will be False, because the Golf tab is not visible on the screen.When setting SetWebAutoScroll to True, the result will be True, because the test automatically scrolls down the web page until it finds the Golf tab.
info

Replace <server> with the appropriate URL.

Example

SetWebAutoScroll

DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");

...
...

//Auto Scroll set to true
seetest.setWebAutoScroll(true);