[ad_1]
I wish to open the iOS management centre (to activate airplane mode) utilizing appium 1.22 with iOS 15.1. The code I’m utilizing works nice with iOS 14.8. I’ve tried utilizing TouchAction and PointerInput Actions, with the identical outcome. The display screen scrolls up on 15.1 however the management centre doesn’t seem. Any assist could be appreciated, I’m blocked with automated assessments on iOS 15.
Surroundings:
iOS 15
appium 1.22
My code:
Dimension d = driver.handle().window().getSize();
int width = d.getWidth();
int peak = d.getHeight();
int w = (int) (.5 * width);
int swipeTo = (int) (peak * 0.2);
PointerInput finger = new PointerInput(PointerInput.Type.TOUCH, "finger");
Sequence swipeUpForControlCentre = new Sequence(finger, 1);
swipeUpForControlCentre.addAction(finger.createPointerMove(Length.ofMillis(0), PointerInput.Origin.viewport(), w, peak));
swipeUpForControlCentre.addAction(finger.createPointerDown(0));
swipeUpForControlCentre.addAction(finger.createPointerMove(Length.ofMillis(700),
PointerInput.Origin.viewport(),w, swipeTo));
swipeUpForControlCentre.addAction(finger.createPointerUp(0));
driver.carry out(Arrays.asList(swipeUpForControlCentre));
[ad_2]
