Skip to main content

SeeTestAutomation- IsElementBlank

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 .

boolean IsElementBlank(Zone, Element, Index, ColorGroups)

Description

Boolean command to check if a given element contains an image or if it is blank.

  • TRUE: if blank
  • FALSE: if not.

Parameters

  • Zone: Select Zone
  • Element: Identifier of the element.
  • Index: Element or text index
  • ColorGroups: Number of colors found in the picture. usually an image will have many color groups, but a blank object with 'X' in the middle will have 2 - 3 color groups.  

Usage

Scenario: The following scenario demonstrates how to use this command:

  1. On the login page of eribank application, while the Username text field is empty, we will use the command to check  that is blank or contains some values in the edit field.

  2. In this example, we have filled the text in the Username  text field. Now, we will use the same command to check whether it has text or blank.

    rr

Code Examples

Java Example

if(client.isElementBlank("NATIVE", "xpath=//*[@id='usernameTextField']", 0, 10)){
// If statement
}

C# Example Expand source

if(client.IsElementBlank("NATIVE", "xpath=//*[@id='usernameTextField']", 0, 10))
{
// If statement
}

VBScript Example Expand source

If StrComp (client.IsElementBlank ( "NATIVE", "xpath=//*[@id='usernameTextField']", 0, 10 ), "True") = 0 Then
Report
'If statement
Else
Report
End If

Python Example Expand source

if(self.client.isElementBlank("NATIVE", "xpath=//*[@id='usernameTextField']", 0, 10)):
# If statement
pass

Perl Example Expand source

if($client->isElementBlank("NATIVE", "xpath=//*[\@id='usernameTextField']", 0, 10)){
# If statement
}