Silk Mobile

Table of Contents (Homepage)

IsFoundIn

IsFoundIn (Zone, SearchElement, Index, Direction, ElementFindZone, ElementToFind, Width, Height)

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

images/images/os-icons/os_symbian02_150x150.png

images/images/os-icons/os_windows_mobile_150x150.png

Description

Search for an element and check if an element related to it exists . The direction can be UP, DOWN, LEFT or RIGHT.

Parameters

Usage

In the following example, we will try to find the ‘Make Payment’ button using the ‘Mortgage Request’ button.

Step 1: Login and navigate to the Make Payment page.

images/download/attachments/2689477/15.jpg

Step 2: Identify the properties of the Mortgage Request button.

images/download/attachments/2689477/16.jpg

Step 3: Now find the properties of the 'Make Payment' Button.

images/download/attachments/2689477/17.jpg

Step 4: In the script area type the following properties:

images/download/attachments/2689477/18.jpg

Result:

images/download/attachments/2689477/19.jpg

Code Examples

Java Example
client.isFoundIn("NATIVE", "accessibilityLabel=Mortgage Request", 0, "Up", "NATIVE", "accessibilityLabel=makePaymentButton", 0, 0)
C# Example
client.IsFoundIn("NATIVE", "accessibilityLabel=Mortgage Request", 0, "Up", "NATIVE", "accessibilityLabel=makePaymentButton", 0, 0)
VBScript Example
client.IsFoundIn ( "NATIVE", "accessibilityLabel=Mortgage Request", 0, "Up", "NATIVE", "accessibilityLabel=makePaymentButton", 0, 0 )
Report
Python Example
self.client.isFoundIn("NATIVE", "accessibilityLabel=Mortgage Request", 0, "Up", "NATIVE", "accessibilityLabel=makePaymentButton", 0, 0)
Perl Example
$client->isFoundIn("NATIVE", "accessibilityLabel=Mortgage Request", 0, "Up", "NATIVE", "accessibilityLabel=makePaymentButton", 0, 0)