The iOS App crashed after scrolling by TouchActions, Action, IOS-Gestures
See original GitHub issueThe problem
The app crashed after scrolling via Appium
Environment
- Appium version: 1.21.0
- IOS: 14.7.1
- Real device or emulator/simulator: real device
Details
I tried few ways to scroll, such as: TouchActions, Actions, IOS-Gestures But the app crashed after scrolling immediately.
This issue does not happen when testing by manual. So, I think the cause is in Appium or WebDriverAgent. Please help me define this cause.
Link to Appium logs
https://gist.github.com/anhphan-cwvn/9b5dbf864c13490806533a0f93293e62
Code To Reproduce Issue [ Good To Have ]
public void scrollToLeftInMenuBar() {
int heightOfScreen = windowSize.getHeight();
int widthOfScreen = windowSize.getWidth();
int anchor = (int) (heightOfScreen * 0.115);
int startPoint = (int) (widthOfScreen * 0.918);
int endPoint = (int) (widthOfScreen * 0.0726);
switch (LoadConfig.getAppiumPlatformName().toLowerCase()){
case "ios":
System.out.println("Swipe left in IOS by Actions");
PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
Sequence dragNDrop = new Sequence(finger, 1);
dragNDrop.addAction(finger.createPointerMove(Duration.ofMillis(0),
PointerInput.Origin.viewport(), startPoint, anchor));
dragNDrop.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
dragNDrop.addAction(finger.createPointerMove(Duration.ofMillis(2700),
PointerInput.Origin.viewport(), endPoint, anchor));
dragNDrop.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
mobileDriver().perform(Arrays.asList(dragNDrop));
break;
default:
System.out.println("Swipe left in Android and Web by TouchAction");
new TouchAction(mobileDriver())
.press(PointOption.point(startPoint, anchor))
.waitAction(WaitOptions.waitOptions((Duration.ofMillis(TimeoutConstants.SWIPE_WAIT_TIMEOUT))))
.moveTo(PointOption.point(endPoint, anchor)).release().perform();
break;
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
app crash on iOS 16.1(beta) when u… - Apple Developer
My app was built with XCode13 and we are now seeing occasional crashes on iOS16.1 (beta). This exception occurs when using the method:....
Read more >9 Fixes for When Your iPhone Apps Keep Crashing
In this case, try exiting the app completely before relaunching it. Access the App Switcher, swipe to the opened app, and swipe up...
Read more >iOS app crashing during swipe gesture? - Stack Overflow
The app will run, it just crashes when I execute a swipe. Here is my code: class ViewController: UIViewController, UIGestureRecognizerDelegate { ...
Read more >touchAction use coordinate doesn't work · Issue #5298 - GitHub
the app crash when scroll. first i use scroll with out specifying an element, doesn't work. i use instrument to record the operation...
Read more >Scroll - Appium
Scroll on the touch screen using finger based motion events ... TouchActions action = new TouchActions(driver); action.scroll(element, 10, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have Device log, is it ok?
https://gist.github.com/anhphan-cwvn/5750b7716d985109dc8935add8c960b2
Please tell me, if you need anything else
Oh, interesting. Thanks for the proper information.