Calculate DPs using density and screenSize of iOS devices

Viewed 26

Problem: Iam trying to calculate DP using the following formula.

dp = (width * 160) / density;

Iam using this formula since i don't know how can i have the DP value directly using Appium framework.

What i already know: Using getWindowSize() and getDisplayDensity() only works for android devices.

My question is: It's possible to know the resolution and the density using Appium for iOS devices?

BTW Iam using javascript.

0 Answers
Related