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.

iOS Mobile: Scroll does not work

See original GitHub issue

The problem

The “mobile: scroll” API is not executed as expected. I will describe it in detail.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.20.2
  • Last Appium version that did not exhibit the issue (if applicable): I can’t remember
  • Desktop OS/version used to run Appium: macOS (Big Sur 11.1)
  • Node.js version (unless using Appium.app|exe): v15.8.0
  • Npm or Yarn package manager: yarn 1.22.5
  • Mobile platform/version under test: iOS 14.3
  • Real device or emulator/simulator: simulator
  • Appium CLI or Appium.app|exe: Appium Cli

Details

  1. TheApp

I got the below error message when using “mobile: scroll” API to scroll to a specific element by predicate string, but it seems not to occur in all other applications.

Failed to find scrollable visible parent with 2 visible children

I realized that prescrollSnapshot is always invisible.

https://github.com/appium/WebDriverAgent/blob/master/WebDriverAgentLib/Categories/XCUIElement+FBScrolling.m#L116

if (![snapshot isWDVisible]) {
    return NO;
}
  1. IntegrationApp

It scrolls over the target element until timeout

=> I want to help figure out the bug, but I can’t do it yet. If so, please show me some ideas to solve, I will fix it and make a PR.

Link to Appium logs

https://gist.github.com/zcmgyu/53e859fa6013e64ddaa89117fbc6acbf

Code To Reproduce Issue [ Good To Have ]

https://github.com/zcmgyu/appium-ios-mobile-scroll-bug

Run below command

yarn integration-app

yarn the-app

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mykola-mokhnachcommented, May 19, 2021

https://developer.apple.com/documentation/xctest/xcuielement/1618666-tap?language=objc If the element exists within a scrollable view but is offscreen, XCTest will attempt to scroll the element onscreen before performing the tap.

0reactions
mykola-mokhnachcommented, Sep 5, 2021

Closed because of no response

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overflow scrolling not working on position fixed element iOS
I have position: fixed navigation bar at the very bottom of a page on mobile devices / sizes. The nav bar itself has...
Read more >
Scrolling Issues on Safari/Chrome iOS - Apple Developer
Hi, I'm having issues with scrolling on iOS (web). I have a web app that when you click on different pill shaped menus...
Read more >
IOS 13 'scrolling' feature is broken on mobile devices
With the release of IOS 13, the 'scrolling' feature does not work for users with Apple devices running IOS 13. The browser being...
Read more >
Screens Won't Scroll | OutSystems
Issue is definitely caused by the background. and is caused by the bouncing page behaviour of IOS mobile page transitions, if you google...
Read more >
Scroll on Iphone is not working - General - Forum | Webflow
You have on body element set overflow: hidden . I have unchecked this in devtools and scroll works on small screens. Hope that...
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