Appium utility method to scroll till any element on a list or on screen | w3 actions

Поделиться
HTML-код
  • Опубликовано: 1 авг 2024
  • #appium_java_tutorial_qavbox #appium #java-client #mobiletesting #hybridapp #automationtesting #appiuminspector #android #scroll #swipe
    This video will explain how to effectively Appium scroll till an element from a list / any element on screen | w3 actions and implement it as utility methods
    TouchActions class is deprecated, so we need to use an alternate approach using Sequence class.
    Appium java-client releases -
    github.com/appium/java-client...
    Sauce labs react mobile apps (Android and IOS ) -
    github.com/saucelabs/my-demo-...
    Complete tutorial - bit.ly/qav_appiumtutorial
    code base - github.com/sunilpatro1985/App...
    Subscribe to this channel -
    bit.ly/youtube-qavbox
    Blog posts -
    qavalidation.com
    Make me awake & feel fresh always, so I can bring lot's of interesting topics for you all, Buy me a coffee?
    buymeacoffee.com/qavalidation

Комментарии • 12

  • @shankark54
    @shankark54 4 месяца назад

    @qavbox how can we verify in horizontally left or right direction, i need to scroll and verify the list of menu aligned horizontal direction , can you please help me ,

  • @emregeo2799
    @emregeo2799 Год назад

    Thanks. How can we get the list of all webelements with scroll down to the end of page?

    • @qavbox
      @qavbox  Год назад

      This video explains how to scroll till end, so in each loop you van capture the items and append into list.
      Let me know if you have any questions

  • @huuhuongnguyen6723
    @huuhuongnguyen6723 6 месяцев назад

    Thanks for your video. By the way, function isEndOfPage(String pageSource) will not work in case the end element of page is a dynamic image. Because pageSource is still different from previous one although it is end of screen. How to deal with it?

    • @qavbox
      @qavbox  6 месяцев назад

      Yes, a couple of scenarios we can't use this pagesource way of scrolling, can you identity that last dynamic element using contains or starts with XPATH? So you can scroll till the element is displayed instead of pagesource!

    • @huuhuongnguyen6723
      @huuhuongnguyen6723 6 месяцев назад

      @@qavbox Also if devices are small or big screens then you must change SCROLL_RATIO dynamically (not fixed 0.5). If not, the element cannot be found. Have you ever used: findElement(new AppiumBy.ByAndroidUIAutomator(new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().resourceIdMatches("xxx"))))? It always RESETS scrolling up until locating at the top of screen before scrolling down to find the element?

  • @jeyapriya155
    @jeyapriya155 11 месяцев назад

    Hi sir, How do we scroll till the end and click on or select multiple elements. The above is to scroll and click on single element.

    • @qavbox
      @qavbox  11 месяцев назад +1

      Once you scrolled till the element, then clicking on single or selecting multiple elements are as usual

    • @jeyapriya155
      @jeyapriya155 11 месяцев назад

      @@qavbox Thank you for the reply. Let me implement and check it out.

  • @sundarkande4429
    @sundarkande4429 11 месяцев назад

    I saw u r some video its very confusing me ....i dont Why its hard to me ....may be its my fault ...
    Scroll upto element, i got this code ---
    driver.findElement(
    new AppiumBy.ByAndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0))"
    + ".scrollIntoView(new UiSelector()" + ".textMatches(\"" + "Creating a post in new version " + "\").instance(0))"));

    This above code is worked for me but i want scroll end of screen
    using such type of script have u any alternative for that