# \[Mobile\] Get Device Height

**URL:** <https://forum.katalon.com/t/mobile-get-device-height/17113>\
**Category:** Miscellaneous\
**Created:** [January 5, 2019, 9:24am UTC](https://forum.katalon.com/t/mobile-get-device-height/17113 "2019-01-05T09:24:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [January 5, 2019, 9:24am UTC](https://forum.katalon.com/t/mobile-get-device-height/17113/1 "2019-01-05T09:24:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gerardosantoshernand](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@gerardosantoshernand](https://forum.katalon.com/u/gerardosantoshernand)\
**Post date:** [November 12, 2019, 4:39pm UTC](https://forum.katalon.com/t/mobile-get-device-height/17113/2 "2019-11-12T16:39:04Z")

</div>

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
