Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to scroll to a specific element in Appium ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.47k
    Comment on it

    Many times there is a requirement in the test step to move to a specific link, keyword, etc. So, we have two methods through which we can directly scroll to the desired element. The two methods are as follows:

    • scrollTo(String text)
    • scrollToExact(String text)

    The above two methods perform scrolling on the first scrollView present on the UI only.
    Lets suppose there is a requirement to scroll to the "Like" link and press enter. Also, if the screen contains more than one "Like" link then scrollTo("Like") method will move the control over the first "Like" text present on the screen.

    If there is a requirement to scroll over the exact match to the string then we use scrollToExact(String text) method. Lets suppose there are 4 "Like" link and one "Like(s)" link on a screen and we want to scroll to "Like(s)" link then we use scrollToExact("Like(s)") method.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: