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
Name | Type | Description |
---|---|---|
AutoScroll | Boolean | * 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.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
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);