How to scroll down to an element in Appium
On This Page What perform scroll down to the constituent mean?March 05, 2026 · 8 min read · Tool Comparison
When testing mobile applications with Appium, interacting with off-screen elements is a mutual challenge. What is Scroll in Appium? Scrolling in Appium automates screen motion to divulge hidden elements, enable interaction through simulated gestures or platform-specific command. Different Types of Appium Scroll This clause explainshow to scroll to a specific element in Appiumand perform actions on it during trial execution .. In, certain elements may subsist in the app & # 8217; s layout but aren & # 8217; t straightaway seeable on the screen. To interact with them, like clicking a button or verifying content, you need to scroll until the element seem. For example, in a food bringing app, you might scroll to see all useable dishes or graze a scope of display and movies in an OTT app. In such scenarios, allows you to automate the scrolling activity so your test can locate and interact seamlessly with off-screen elements. Scrolling is indispensable in mobile app testing due to the limited and active content loading patterns typical of roving interfaces: Must Read: Appium supports multiple scroll methods, depend on the app & # 8217; s structure and platform behavior, to assist tester interact with off-screen elements. Below is an account of the different types of Appium whorl strategies. Also Read: This method scrolls the screen by specifying start and end co-ordinate. It is a simple and fast approach but may lack tractability for dynamic layouts or device with varying blind sizes. UiScrollable is an Android-specific proficiency that programmatically scroll through views. It is especially efficacious for finding elements based on text, description, or other attributes in complex UI structure. Using Appium ’ s Mobile JSON Wire Protocol, testers can execute scroll through themobile: scrollbid. This method allows for open and straightforward scrolling by specifying direction or target elements. simulate realistic exploiter gestures by specify successiveness like press, move, and release. It is ideal when customized scroll behavior is needed or when default scrolling methods do not suffice. The Flick Gesture mimics fast, momentum-driven swipes across the blind. It is specially utilitarian for quickly navigating long lists, carousel, or content-heavy interfaces. While various are available in the market, the most popular among them is Appium. Appium come up with a rich classUiScrollable, which do it potential to scroll down to the page and execute actions on component. Pro tip: Tools like SUSA can handle this autonomously — upload your app and get results without writing a single test script. It is a powerful Android class that execute element lookups in scrollable layouts.scrollIntoViewclass performs scroll activeness until the finish element is found on the screen. UiScrollable is a UiCollectionand provides support for seek for item in scrollable layout elements. This family can be used with horizontally or vertically scrollable controls. You can useUiScrollableswipe to search elements in a list or search factor outside of the blind like comment field, text or button.ScrollIntoView has UiSelectoras a lookup criteria remark that permit it to find elements by text or id. Prerequisites: Make sure you have all software installed and running in your system. In this example, taking a sample APK to automate using Appium. You can get some sample test apk ’ s on your system on below path: Using one such apk ‘API Demos’ for this article. Automation test will establish the app, click on‘Views’and will locate‘WebView’by scroll down the list and clicking over it as seen in the icon below. Make sure you get all the Appium and testing dependencies configured on your system such as: Pro Tip: Use to add all the capabilities The next codification usesUiScrollable (), scrollIntoView (), UiSelector (), and scrollable ()to scroll down to an ingredient until it is visible using Appium. You can automate any scroll scenario in Appium using the above methods. Run tests across assorted OS versions and real devices for best truth and coverage. BrowserStack let you scale effortlessly by integrating Appium with thousands of real Android and iOS device viaApp Automate. After integration with BrowserStack App Automate, the code will appear like below: Test Results Test results can be watch onApp Automate Dashboardonce the test execution is completed. By clicking on individual tests will afford you a detailed report for each examination include steps,, Appium log, execution video logs, and former detail for best debugging of failed trial. When automating whorl actions in Appium, it & # 8217; s crucial to test in. lets you run Appium tests on real Android and iOS device, proffer respective practical advantages: To create scroll actions more reliable during, especially when elements are outside the visible screen area, postdate these bakshish: Scrolling to ingredient in Appiumis essential for testing real-world mobile interactions, where content often extends beyond the visible blind. Using the right curl strategy can see stable and authentic mechanization. Pairing Appium with real device testing platform like BrowserStack further hike accuracy by validating scroll behavior across different device and OS versions. Tutorials Best Practices, Tips, and Tricks Getting Started with Differences and Comparisons On This Page # Ask-and-Contributeabout this topic with our Discord community. Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed. Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.How to scroll down to an element in Appium
Overview
What does scroll down to the element mean?
Importance of Scrolling in Mobile Apps
Different Types of Appium Scroll Strategies
1. Scroll by Coordinates
2. UiScrollable (Android Only)
3. Mobile JSON Wire Protocol
4. Touch Actions (Gesture-Based Scroll)
5. Flick (Swipe) Gesture
How to Scroll until Element is Seeable in Appium using visibleUiScrollable
C: \Users\singe\AppData\Local\Android\Sdk\system-images\android-25\google_apis\x86\data\app
Code to Scroll Down until Element is Seeable in Appium
package testing;
importorg.testng.annotations.Test;importorg.openqa.selenium.remote.DesiredCapabilities;importio.appium.java_client.android.AndroidDriver;importjava.net.URL;importjava.util.concurrent.TimeUnit;public classscrolldown {@ Testpublic voidscroll () {try{DesiredCapabilities caps =newDesiredCapabilities (); caps.setCapability (`` deviceName '', `` Google pixel 4 ''); //Give your device/emulator gens caps.setCapability (`` udid '', `` emulator-5554 ''); // Go to adb location i.e. C: \Users\singe\AppData\Local\Android\Sdk\platform-tools in command prompt and execute ‘ adb devices ’ to get udid caps.setCapability (`` platformVersion '', `` 8.1.0 ''); //Give android version of your device. (Check ‘ about phone ’ subdivision) caps.setCapability (`` appPackage '', `` com.hmh.api ''); //provide app package name. Apkinfo can be used or execute dumpsys window windows | grep -E ‘ mCurrentFocus ’ command in adb shield in cmdin C: \Users\singe\AppData\Local\Android\Sdk\platform-tools caps.setCapability (`` appActivity '', `` com.hmh.api.ApiDemos ''); AndroidDriver driver =newAndroidDriver (newURL (`` http: //127.0.0.1:4723/wd/hub ''), cap); //Create driver object driver.manage () .timeouts () .implicitlyWait (10, TimeUnit.SECONDS); //Implicit wait of 10 seconds driver.findElementByXPath (`` // * [contains (@ schoolbook, 'Views ')] '') .click (); driver.findElementByAndroidUIAutomator (`` new UiScrollable (new UiSelector () .scrollable (true) .instance (0)) .scrollIntoView (new UiSelector () .textContains (\ '' WebView\ '') .instance (0)) '') .click (); //scroll down to the component and click Thread.sleep(10000); //wait of 10 moment driver.quit (); //closes the driver session}catch(Exception e) {//TODOAuto-generated match cube e.printStackTrace ();}}}parcel examine; meaning java.net.URL; import java.util.List; import java.util.function.Function; import java.net.MalformedURLException; signification io.appium.java_client.MobileBy; signification io.appium.java_client.android.AndroidDriver; import io.appium.java_client.android.AndroidElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; meaning org.testng.annotations.Test; public grade BrowserStackSample {public static nothingness main (String [] args) throws MalformedURLException, InterruptedException {DesiredCapabilities caps = new DesiredCapabilities (); // Set your access credentials caps.setCapability (`` browserstack.user ”, & lt; user-name & gt;); caps.setCapability (`` browserstack.key '', & lt; access-key & gt;); // Set URL of the application under test caps.setCapability (`` app '', `` bs: //d74ed9c2bd06fb02d7b863b3f1a7f8dfe97092b7 ''); // Specify twist and os_version for examine caps.setCapability (`` device '', `` Samsung Galaxy S5 ''); caps.setCapability (`` os_version '', `` 4.4 ''); // Set former BrowserStack capabilities caps.setCapability (`` project '', `` First Java Project ''); caps.setCapability (`` construct '', `` browserstack-build-1 ''); caps.setCapability (`` name '', `` first_test ''); // Initialise the remote Webdriver using BrowserStack remote URL // and desired capabilities defined above AndroidDriver & lt; AndroidElement & gt; driver = new AndroidDriver & lt; AndroidElement & gt; (new URL (`` http: //hub.browserstack.com/wd/hub ''), caps); // Test case for the BrowserStack sampling Android app. // If you feature upload your app, update the test suit here. //driver.findElementByName (`` Cancel '') .click (); driver.findElementByXPath (`` // * [contains (@ text, 'Views ')] '') .click (); driver.findElementByAndroidUIAutomator (`` new UiScrollable (new UiSelector () .scrollable (true) .instance (0)) .scrollIntoView (new UiSelector () .textContains (\ '' WebView\ '') .instance (0)) '') .click (); Thread.sleep (5000); // Invoke driver.quit () after the exam is execute to show that the test is finish. driver.quit ();}}Testing on Real Mobile Devices with BrowserStack
Good Practices for Scrolling to Elements in Appium
Conclusion
Appium Useful Resources
Related Guides
Automate This With SUSA
Test Your App Autonomously