Silk Mobile

Table of Contents (Homepage)

VerifyElementNotFound

VerifyElementNotFound(Zone, Element, Index)

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

Description

Verify that an element is not found in a specified zone

Parameters

  • Zone: Select Zone

  • Element: what to not find: select the Element from the drop-down list OR insert text (for OCR text identification) OR insert Native property into the empty box in the drop-down list

  • Index: Element Order (= the number of times the element appears more then once). Index=0 refers to the first appearance of the element; Index=1 refers to the second appearance of the element, etc.

Usage

Scenario : In the following example I will check that the login process was made successfully by verifying that the 'Login' text is not found.

Command usage: In order to verify that an element is not found, you can use the 'VerifyElementNotFound" command, which will throw an exception if the element is found.

Parameters:

  • Zone - Select Zone – will be set to "TEXT"

  • Element - What to search for: select the Element from the drop-down list OR insert text into the empty box in the drop-down list (for OCR text identification) – will be set to 'Login'

  • Index - Element or text index - will be set to "0"

images/download/attachments/2688936/2.jpg images/download/attachments/2688936/3.jpg

Code Examples

Java Example
client.VerifyElementNotFound("TEXT", "Login", 0);
C# Example
client.VerifyElementNotFound("TEXT", "Login", 0);
VBScript Example
client.VerifyElementNotFound "TEXT", "", 0
Report
Python Example
self.client.verifyElementNotFound("TEXT", "Login", 0)
Perl Example
$client->verifyElementNotFound("TEXT", "Login", 0);