GXtest UI Commands - Verify

Official Content
This documentation is valid for:

This command is useful to validate if a boolean value is true, setting optionally if test execution must be stopped when validation fails and a message identifying the validation.

verifyValue_png

verifyStop_png

verifyMsg_png

Works like an assertion but if the value is not true, then a screenshot of the web page is taken and by default causes that test to stop its execution.

Parameters:

  • Value: the boolean value to check.
  • StopExecution: optional parameter indicating if the received parameter is not true then execution must be stopped or not. The default value is true.
  • Message: optional parameter to identify the validation done. Useful when seeing a test execution result.

Returns: 

This method doesn't return any value

Examples of use:

This command can be combined with several commands.

&driver.Verify(&driver.IsElementPresentByID("controlID"))

&driver.Verify(not &driver.AppearText("Not found"), false) 

&driver.Verify(not &driver.AppearText("Not found"), false, "Text 'Not found' was found") 

&driver.Verify(not &driver.AppearText("Not found"))

&driver.Verify(&driver.GetValueByName("controlName") = "Customer Name", false) 

&driver.Verify(&driver.GetValueByName("controlName") = "Customer Name", false, '&driver.GetValueByName("controlName") = "Customer Name"')

Availability

This set of commands is available since GeneXus 16 upgrade 10.