P2CY
Description
According to the given percentage, this command will return the active device's height pixel count (Y Coordinate) as an Integer.
With this command and the matching P2CX command, you can avoid relying on coordinates and to give relative size not based on resolution of device
Parameters
Name | Value | Description |
---|---|---|
Percentage | Integer | Given screen percentage Value will be between 0 to 100 |
Usage
info
Replace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
Example
In the following example I wish to verify that the application logo is located in the top 20% of the screen. I will have to get the width of 20% of the screen's height in coordinates.
P2CY
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");
...
...
seetest.p2cy(20);