Difference between revisions of "Work with Balloons"

From GXtest Wiki
Jump to: navigation, search
(New page: Category:How to Los ballons son elementos que muestran mensajes provenientes de validaciones (ejecutadas con Ajax) sobre los elementos de nuestras aplicaciones. En el siguiente ejempl...)
 
Line 1: Line 1:
[[Category:How to]]
+
[[Category:How to (en)]]
  
Los ballons son elementos que muestran mensajes provenientes de validaciones (ejecutadas con Ajax) sobre los elementos de nuestras aplicaciones. En el siguiente ejemplo se puede ver sobre el campo CountryId el mensaje "No matching country". El lugar donde aparece el mensaje se lo conoce como balloon.
+
The ballons are elements that show messages from validation (performed with Ajax) on the elements of our applications. In the following example it can be seen on the country field the message "No matching country." The place where the message appears is known as the balloon.
  
 
[[Image:balloon.jpg |center ]]
 
[[Image:balloon.jpg |center ]]
  
== Comandos sobre Balloons ==
+
== Commands for Balloons ==
Para trabajar con los mismos (verificar si aparecen, si aparecen con determinado texto, o si no aparecen) vamos a tener que asociar al comando el control sobre el que aparece el ballon.
+
To work with them (check if present, if they appear with certain text, or if they are not listed) we have to associate the command with the control where the ballon appears on.
 +
 
 +
That is why we have different commands that help us:
  
Es por esto que contamos con distintos comandos que nos ayudan:
 
 
* AppearBalloon
 
* AppearBalloon
 
* VerifyControlValidation  
 
* VerifyControlValidation  
  
Para ballons que aparecen dentro de grillas
+
For balloons that appear within grids
 
* VerifyControlValidationTable  
 
* VerifyControlValidationTable  
 
* AppearBalloonTable
 
* AppearBalloonTable
  
Para verificar que un ballon aparece con determinado texto se utiliza VerifyControlValidation o VerifyControlValidationTable si se trabaja con un control en una grilla. Dicho comando recibe como parámetros importantes, el control sobre el cual queremos hacer la validación, el mensaje de error que queremos validar y el tipo de balloon (puede ser una advertencia o un error).
+
To verify that a ballon appears with a given text we use VerifyControlValidation, or VerifyControlValidationTable when working with a control in a grid. This command gets as important parameters the control over which we want to do the validation, the error message we want to validate and the type of balloon (may be a warning or error).
  
De esta forma se pueden expresar todas estas posibilidades:
+
This way you can express all these possibilities:
* que aparezca un balloon cualquiera
+
* any balloon appears
* que no aparezca un balloon cualquiera
+
* no balloon appears
* que aparezca un texto en un balloon de tipo advertencia
+
* display certain text in a warning balloon
* que aparezca un texto en un balloon de tipo error
+
* display certain text in a error balloon
* que no aparezca un texto en un balloon de tipo adevertencia
+
* certain text is not displayed in a warning balloon
* que no aparezca un texto en un balloon de tipo error
+
* certain text is not displayed in a error balloon
  
== Ejemplo de uso ==
+
== Example ==
En el ejemplo que se muestra en la imagen si se quiere validar que aparezca el error "No matching country" sobre el CountryId se pondría: VerifyControlText(CountryId,"No matching country", Error).
+
In the example shown in the figure above, if you want to validate that the error "No matching country" will appear on the Country:  
 +
VerifyControlText (CountryId, "No matching country", Error).
  
Para verificar que aparece algún balloon se usa AppearBalloon y para validar que no aparezca ningún balloon se debe usar el mismo comando negado. En la imagen de ejemplo si quisiéramos validar que aparezca algún mensaje sobre el control se pondría: AppearBalloon(CountryId).
+
To verify that any balloon is displayed you have to use AppearBalloon, and to verify that no balloon appears you must use the same command negated. In the same example if we wanted to validate that a message appears on the control you should use:
 +
AppearBalloon (CountryId).

Revision as of 17:49, 4 May 2010


The ballons are elements that show messages from validation (performed with Ajax) on the elements of our applications. In the following example it can be seen on the country field the message "No matching country." The place where the message appears is known as the balloon.

Balloon.jpg

Commands for Balloons

To work with them (check if present, if they appear with certain text, or if they are not listed) we have to associate the command with the control where the ballon appears on.

That is why we have different commands that help us:

  • AppearBalloon
  • VerifyControlValidation

For balloons that appear within grids

  • VerifyControlValidationTable
  • AppearBalloonTable

To verify that a ballon appears with a given text we use VerifyControlValidation, or VerifyControlValidationTable when working with a control in a grid. This command gets as important parameters the control over which we want to do the validation, the error message we want to validate and the type of balloon (may be a warning or error).

This way you can express all these possibilities:

  • any balloon appears
  • no balloon appears
  • display certain text in a warning balloon
  • display certain text in a error balloon
  • certain text is not displayed in a warning balloon
  • certain text is not displayed in a error balloon

Example

In the example shown in the figure above, if you want to validate that the error "No matching country" will appear on the Country:

VerifyControlText (CountryId, "No matching country", Error).

To verify that any balloon is displayed you have to use AppearBalloon, and to verify that no balloon appears you must use the same command negated. In the same example if we wanted to validate that a message appears on the control you should use:

AppearBalloon (CountryId).