Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

P2CX(Percentage)

Supported_os
SupportWMobiletrue
SupportIOStrue
SupportSymbiantrue
SupportAndroidtrue
SupportWPtrue
SupportBBtrue

Description

According to the given percentage, this command will return the active device's width pixel count (X Coordinate) as an Integer. With this command and the matching P2CY 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 we will get the width pixels value of 80% of the screen (where the EriBank logo ends (X coordinates of 80% of the screen)

Parameters:

  • Percentage – will be set to 80.

Code Examples

Code Block
languagejava
titleJava Example
linenumberstrue
int int0 = client.p2cx(80);
Code Block
languagec#
titleC# Example
linenumberstrue
collapsetrue
int int0 = client.P2cx(80);
Code Block
languagevb
titleVBScript Example
linenumberstrue
collapsetrue
int0 = client.P2cx ( 80 )
Report
Code Block
languagepy
titlePython Example
linenumberstrue
collapsetrue
var0 = self.client.p2cx(80)
Code Block
languageperl
titlePerl Example
linenumberstrue
collapsetrue
my $int0 = $client->p2cx(80);