Skip to main content

SeeTestAutomation- P2CY

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

P2CY(Percentage)

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

  • Percentage – Given screen percentage Value will be between 0 to 100 .

Usage

Scenario: 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.

Parameters**:**

  • Percentage – will be set to 20.

Code Examples

Java Example

int int0 = client.p2cy(20);

C# Example Expand source

int int0 = client.P2cy(20);

VBScript Example Expand source

int0 = client.P2cy ( 20 )
Report

Python Example Expand source

var0 = self.client.p2cy(20)

Perl Example Expand source

my $int0 = $client->p2cy(20);