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.

Cannot swipe from bottom to top on ios

See original GitHub issue

I would like to set the wifi status on ios and in order to do that, I need to to swipe up from the bottom the Control Center.

        dimension = driverWrapper.getIosDriver().manage().window().getSize();
        int middleX = dimension.getWidth() / 2;
        int y = dimension.getHeight();
        driverWrapper.getIosDriver().swipe(middleX,y - 10 ,middleX,150,600);

// action = new TouchAction(driverWrapper.getIosDriver()); // action.press(middleX, y - 10 ).waitAction(100) // .moveTo(middleX, y / 2).release().perform();

I used both of the codes and nothing works. Before I upgraded java client to 4.0.0 and appium to 1.5.2 it worked correctly.

Environment

  • java client build version or git revision if you use some shapshot: 4.0.0
  • Appium server version or git revision if you use some shapshot: 1.5.2
  • Desktop OS/version used to run Appium if necessary: mac os
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe:
  • Mobile platform/version under test: ios 9 and above
  • Real device or emulator/simulator: real device

Ecxeption stacktraces

I get an error of: Error: VerboseError: point is not within the bounds of the screen

Link to Appium logs

[debug] [UIAuto] Socket data received (49 bytes) [debug] [UIAuto] Got result from instruments: {“status”:0,“value”:{“width”:320,“height”:568}} [MJSONWP] Responding to client with driver.getWindowSize() result: {“width”:320,“height”:568} [HTTP] <-- GET /wd/hub/session/31411e39-f408-418f-b9b8-e28b80ba1b35/window/current/size 200 1071 ms - 98 [HTTP] --> POST /wd/hub/session/31411e39-f408-418f-b9b8-e28b80ba1b35/touch/perform {“actions”:[{“action”:“press”,“options”:{“x”:160,“y”:558}},{“action”:“wait”,“options”:{“ms”:100}},{“action”:“moveTo”,“options”:{“x”:160,“y”:284}},{“action”:“release”,“options”:{}}]} [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“press”,“options”:{“x”:160,“y”:558}},{“action”:“wait”,“options”:{“ms”:100}},{“action”:“moveTo”,“options”:{“x”:160,“y”:284}},{“action”:"… [debug] [iOS] Executing iOS command ‘performTouch’ [debug] [UIAuto] Sending command to instruments: target.touch([{“touch”:[{“x”:160,“y”:558}],“time”:0.2},{“touch”:[{“x”:160,“y”:558}],“time”:0.30000000000000004},{“touch”:[{“x”:320,“y”:842}],“time”:0.5}])

[debug] [Instruments] [INST] 2016-06-19 07:39:13 +0000 Debug: Got new command 6 from instruments: target.touch([{“touch”:[{“x”:160,“y”:558}],“time”:0.2},{“touch”:[{“x”:160,“y”:558}],“time”:0.30000000000000004},{“touch”:[{“x”:320,“y”:842}],“time”:0.5}])

[debug] [Instruments] [INST] 2016-06-19 07:39:13 +0000 Debug: evaluating target.touch([{“touch”:[{“x”:160,“y”:558}],“time”:0.2},{“touch”:[{“x”:160,“y”:558}],“time”:0.30000000000000004},{“touch”:[{“x”:320,“y”:842}],“time”:0.5}])

[debug] [Instruments] [INST] 2016-06-19 07:39:13 +0000 Debug: target.touch(__NSCFArray)

[debug] [Instruments] [INST] 2016-06-19 07:39:13 +0000 Debug: point is not within the bounds of the screen

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:22 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
shay777commented, Aug 14, 2016

You did nothing wrong. It seems to be the expected behavior for some reason. I gave up after a lot of search and workarounds. I switched back to an older version of appium (1.4.16) and now it works perfectly.

0reactions
PrabhatPandeycommented, Apr 24, 2017

Apparently in java-client-beta6 This bottom to top swipe issue is resolved. I am using 1.6.3 Appium , Xcode is 8.

Putting the same code which work in iPhone-5s-10.2

public static void SwitchWifiBar(AppiumDriver driver) { final int height = driver.findElementByClassName(“UIAWindow”).getSize().getHeight(); final int width = driver.findElementByClassName(“UIAWindow”).getSize().getWidth(); System.out.println(“height”+height); System.out.println(“width”+width); driver.swipe(width-100, height-5, width-100,0, 100); driver.findElementByAccessibilityId(“Wi-Fi”).click(); }

Read more comments on GitHub >

github_iconTop Results From Across the Web

iPhone Swipe Up Not Working (Solved!) - The Gadget Buyer
There are two main reasons that an iPhone might not swipe up: problems with the touchscreen and software issues. A damaged touchscreen sensor ......
Read more >
Top 10 Ways to iPhone Swipe up Not Working - TunesKit
Swipe up not working on iPhone usually can be due to iPhone VoiceOver. If you turn it on while open Control Center, you...
Read more >
iPhone Swipe Up Not Working?- 9 Quick Ways To Fix It!
Method 1. Remove your case, cover, or screen protector ... At times, screen protectors or cases can make it difficult to swipe up...
Read more >
How to fix a problem on the iPhone X swipe up that's ... - iKream
First solution: Force restart to fix your iPhone X swipe up that's not working in iOS 13. · Touch your finger to the...
Read more >
How to Fix iPhone Swipe Up Menu Not Working After iOS 16 ...
Solution 1: Force Restart Your iPhone · Solution 2: Make Sure You Enable Control Center Access on Lock Screen · Solution 3: Use...
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