[Mobile] Get Device Height


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/mobile-get-device-height.html

No puedo obtener la altura ni el ancho de mi dispositivo usando katalon studio y appium cuando ejecuto mi script solo se queda en ejecucion en la linea de codigo, alguien podria ayudarme como resolver esto porfavor me urge para hacer scroll o swipe en ios

Class Groovy

public class otherSwipe {
public static swipe(){
KeywordLogger log = new KeywordLogger()
AppiumDriver<?> driver = MobileDriverFactory.getDriver();
TouchAction touchAction = new TouchAction(driver);
println(Mobile)
String device_Height = Mobile.getDeviceHeight()
String device_Width = Mobile.getDeviceWidth()
int startX = device_Width / 2
int endX = startX
int startY = device_Height * 0.9
int endY = device_Height * 0.1
touchAction.longPress(startX, startY).moveTo(endX, endY).release().perform();
}
}

Test Case

otherSwipe.swipe()

katalon studio: Version: 6.2.1
Appium : 1.15.0
iPhone X: Version: 13.1.3