question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Vertical scroll is not working

See original GitHub issue

The problem

I upgraded appium version from 1.6.5 to 1.7.0 & node version to 8.5.0, after which I find that the scroll is not working for android.

Note: Initially with 1.6.5, it was working. But after upgrading 1.7.0 and reverting to 1.6.5, android scroll stopped working. But it working for IOS.

If anyone could advise, that’ll be really helpful.

Thanks, Brad

Environment

  • Appium version - 1.7.7
  • Last Appium version that did not exhibit the issue (if applicable): 1.6.5
  • Desktop OS/version used to run Appium: Mac OS sierra (10.12.6)
  • Node.js version (unless using Appium.app|exe): v8.5.0
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Nexus_5x_API_25 (emulator)
  • Appium CLI or Appium.app|exe:

Details

If necessary, describe the problem you have been experiencing in more detail.

Following is the Appium server logs generated when TouchAction is called. There are no error logs displayed.

[androidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:true} [debug] [AndroidBootstrap] Received command result from bootstrap [debug] [MJSONWP] Responding to client with driver.pressKeyCode() result: true [HTTP] <-- POST /wd/hub/session/e0957ac3-f6cf-4462-8886-009845b2c2a9/appium/device/press_keycode 200 1139 ms - 76 [HTTP] --> GET /wd/hub/session/e0957ac3-f6cf-4462-8886-009845b2c2a9/window/current/size {} [debug] [MJSONWP] Calling AppiumDriver.getWindowSize() with args: [“current”,“e0957ac3-f6cf-4462-8886-009845b2c2a9”] [debug] [AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:{“height”:1794,“width”:1080}} [debug] [AndroidBootstrap] Received command result from bootstrap [debug] [MJSONWP] Responding to client with driver.getWindowSize() result: {“height”:1794,“width”:1080} [HTTP] <-- GET /wd/hub/session/e0957ac3-f6cf-4462-8886-009845b2c2a9/window/current/size 200 32 ms - 100 start =897 end =358 [HTTP] --> POST /wd/hub/session/e0957ac3-f6cf-4462-8886-009845b2c2a9/touch/perform {“actions”:[{“action”:“press”,“options”:{“x”:0,“y”:897}},{“action”:“wait”,“options”:{“ms”:2000}},{“action”:“moveTo”,“options”:{“x”:0,“y”:358}},{“action”:“release”,“options”:{}}]} [debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“press”,“options”:{“x”:0,“y”:897}},{“action”:“wait”,“options”:{“ms”:2000}},{“action”:“moveTo”,“options”:{“x”:0,“y”:358}},{“action”:“release”,“options”:{}}],“e0957ac3-f6cf-4462-8886-009845b2c2a9”] [debug] [AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“swipe”,“params”:{“startX”:0,“startY”:897,“endX”:0,“endY”:358,“steps”:56}} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“swipe”,“params”:{“startX”:0,“startY”:897,“endX”:0,“endY”:358,“steps”:56}} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: swipe [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Display bounds: [0,0][1080,1794] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Display bounds: [0,0][1080,1794] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Swiping from [x=540.0, y=897.0] to [x=540.0, y=358.0] with steps: 56 [debug] [AndroidBootstrap] Received command result from bootstrap [debug] [MJSONWP] Responding to client with driver.performTouch() result: true [HTTP] <-- POST /wd/hub/session/e0957ac3-f6cf-4462-8886-009845b2c2a9/touch/perform 200 1349 ms - 76 [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:true} [HTTP] --> POST /wd/hub/session/e0957ac3-f6cf-4462-8886-009845b2c2a9/timeouts {“type”:“implicit”,“ms”:10000} [debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: [“implicit”,10000,“e0957ac3-f6cf-4462-8886-009845b2c2a9”] [debug] [BaseDriver] Set implicit wait to 10000ms [debug] [MJSONWP] Responding to client with driver.timeouts() result: null [HTTP] <-- POST /wd/hub/session/e0957ac3-f6cf-4462-8886-009845b2c2a9/timeouts 200 2 ms - 76 [HTTP] --> POST /wd/hub/session/e0957ac3-f6cf-4462-8886-009845b2c2a9/element {“using”:“accessibility id”,“value”:“uia-personal-rego-step2-home-address”} [debug] [MJSONWP] Calling AppiumDriver.findElement() with args: [“accessibility id”,“uia-personal-rego-step2-home-address”,“e0957ac3-f6cf-4462-8886-009845b2c2a9”] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Waiting up to 10000 ms for condition

Code To Reproduce Issue [ Good To Have ]

Capabilities are given below function AppiumDriver setUp(url) { capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"emulator-5554"); capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,"android"); capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,"7.1.1"); capabilities.setCapability(MobileCapabilityType.APP, appForAndroid.getAbsolutePath()); capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 30); capabilities.setCapability(MobileCapabilityType.PLATFORM, "android"); capabilities.setCapability("noReset", true); androidDriver = new AndroidDriver<>(url, capabilities); androidDriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); return androidDriver; Code for scrolling down

public void scrollScreenToEnd(AppiumDriver driver, Integer relativeYPositionOfPreviousField) { TouchAction swipe = new TouchAction(driver).press(0, relativeYPositionOfPreviousField).waitAction(Duration.ofSeconds(3)).moveTo(0, relativeYPositionOfPreviousField - 100).release(); swipe.perform(); }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
hardik-plumecommented, Mar 2, 2018

i would say this is still a bug for appium, what you found is a workaround

1reaction
Brad19commented, Sep 29, 2017

Thanks @lanzelot1989, you made my day. I’ve found the issue. The issue was about the value that was set for x co-ordinate wasn’t working. But it was working earlier with appium 1.6.5. Not sure why this is not working for android now. But if I mention size.Width - 10, it works good. Closing this now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

scrollbars="vertical" is not working in TextView [duplicate]
Using scrollbar on textView. you have to add this line in java textView.setMovementMethod(new ScrollingMovementMethod());.
Read more >
Vertical scrolling in <ScrollView Orientation="Both"> not ...
I encountered this issue when trying to present tabular data in my application. I had to use ScrollView with Orientation property set to...
Read more >
Vertical scrolling is not working when <ui:scrollerWrapper> is ...
Vertical scrolling is not working when <ui:scrollerWrapper> is used in SF mobile app (both android and iOS) on a Spring 21 org.
Read more >
How to Fix Vertical Scroll Bar Not Working on Excel - Saint
Based on what we know, this issue can be caused by several reasons. First, it's possible that the scroll bar is disabled in...
Read more >
Android ScrollView (Horizontal, Vertical) with Examples
In android, ScrollView supports only vertical scrolling. In case, if we want to implement horizontal scrolling, then we need to use a HorizontalScrollView ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found