Click or drag to resize
Ranorex

Validate Class

Provides a number of different validation methods.
Inheritance Hierarchy
SystemObject
  RanorexValidate

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static class Validate

The Validate type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberEnableReport
Gets or sets a value indicating whether validations should produce report messages or not.
Top
Methods
  NameDescription
Public methodStatic memberAreEqual(Object, Object)
Validates if the actual value of an object equals an expected value.
Public methodStatic memberAreEqual(String, Regex)
Validates if the given regular expression matches the given string.
Public methodStatic memberAreEqual(Object, Object, String)
Validates if the actual value of an object equals an expected value.
Public methodStatic memberAreEqual(String, Regex, String)
Validates if the given regular expression matches the given string.
Public methodStatic memberAreEqual(Object, Object, String, ValidateOptions)
Validates if the actual value of an object equals an expected value.
Public methodStatic memberAreEqual(Object, Object, String, Boolean)
Validates if the actual value of an object equals an expected value.
Public methodStatic memberAreEqual(String, Regex, String, ValidateOptions)
Validates if the given regular expression matches the given string.
Public methodStatic memberAreEqual(String, Regex, String, Boolean)
Validates if the given regular expression matches the given string.
Public methodStatic memberAttribute(Element, String, Object)
Validates if the attribute of the specified element matches a specific value.
Public methodStatic memberAttribute(Element, String, Regex)
Validates if the attribute of the specified element matches a specific regular expression.
Public methodStatic memberAttribute(RepoItemInfo, String, Object)
Validates if the attribute of the element for the specified repository item matches a specific value.
Public methodStatic memberAttribute(RepoItemInfo, String, Regex)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Public methodStatic memberAttribute(Element, String, Object, String)
Validates if the attribute of the specified element matches a specific value.
Public methodStatic memberAttribute(Element, String, Regex, String)
Validates if the attribute of the specified element matches a specific regular expression.
Public methodStatic memberAttribute(RepoItemInfo, String, Object, String)
Validates if the attribute of the element for the specified repository item matches a specific value.
Public methodStatic memberAttribute(RepoItemInfo, String, Regex, String)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Public methodStatic memberAttribute(Element, String, Object, String, ValidateOptions)
Validates if the attribute of the specified element matches a specific value.
Public methodStatic memberAttribute(Element, String, Object, String, Boolean)
Validates if the attribute of the specified element matches a specific value.
Public methodStatic memberAttribute(Element, String, Regex, String, ValidateOptions)
Validates if the attribute of the specified element matches a specific regular expression.
Public methodStatic memberAttribute(Element, String, Regex, String, Boolean)
Validates if the attribute of the specified element matches a specific regular expression.
Public methodStatic memberAttribute(RepoItemInfo, String, Object, String, ValidateOptions)
Validates if the attribute of the element for the specified repository item matches a specific value.
Public methodStatic memberAttribute(RepoItemInfo, String, Object, String, Boolean)
Validates if the attribute of the element for the specified repository item matches a specific value.
Public methodStatic memberAttribute(RepoItemInfo, String, Regex, String, ValidateOptions)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Public methodStatic memberAttribute(RepoItemInfo, String, Regex, String, Boolean)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Public methodStatic memberAttributeContains(IElement, String, String)
Validates if the attribute of the specified element contains a specific value.
Public methodStatic memberAttributeContains(RepoItemInfo, String, String)
Validates if the attribute of the element for the specified repository item contains a specific value.
Public methodStatic memberAttributeContains(IElement, String, String, String)
Validates if the attribute of the specified element contains a specific value.
Public methodStatic memberAttributeContains(RepoItemInfo, String, String, String)
Validates if the attribute of the element for the specified repository item contains a specific value.
Public methodStatic memberAttributeContains(IElement, String, String, String, ValidateOptions)
Validates if the attribute of the specified element contains a specific value.
Public methodStatic memberAttributeContains(IElement, String, String, String, Boolean)
Validates if the attribute of the specified element contains a specific value.
Public methodStatic memberAttributeContains(RepoItemInfo, String, String, String, ValidateOptions)
Validates if the attribute of the element for the specified repository item contains a specific value.
Public methodStatic memberAttributeContains(RepoItemInfo, String, String, String, Boolean)
Validates if the attribute of the element for the specified repository item contains a specific value.
Public methodStatic memberAttributeEqual(IElement, String, Object)
Validates if the attribute of the specified element matches a specific value.
Public methodStatic memberAttributeEqual(RepoItemInfo, String, Object)
Validates if the attribute of the element for the specified repository item matches a specific value.
Public methodStatic memberAttributeEqual(IElement, String, Object, String)
Validates if the attribute of the specified element matches a specific value.
Public methodStatic memberAttributeEqual(RepoItemInfo, String, Object, String)
Validates if the attribute of the element for the specified repository item matches a specific value.
Public methodStatic memberAttributeEqual(IElement, String, Object, String, ValidateOptions)
Validates if the attribute of the specified element matches a specific value.
Public methodStatic memberAttributeEqual(IElement, String, Object, String, Boolean)
Validates if the attribute of the specified element matches a specific value.
Public methodStatic memberAttributeEqual(RepoItemInfo, String, Object, String, ValidateOptions)
Validates if the attribute of the element for the specified repository item matches a specific value.
Public methodStatic memberAttributeEqual(RepoItemInfo, String, Object, String, Boolean)
Validates if the attribute of the element for the specified repository item matches a specific value.
Public methodStatic memberAttributeNotContains(IElement, String, String)
Validates if the attribute of the specified element does not contain the specific value.
Public methodStatic memberAttributeNotContains(RepoItemInfo, String, String)
Validates if the attribute of the element for the specified repository item does not contain the specific value.
Public methodStatic memberAttributeNotContains(IElement, String, String, String)
Validates if the attribute of the specified element does not contain the specific value.
Public methodStatic memberAttributeNotContains(RepoItemInfo, String, String, String)
Validates if the attribute of the element for the specified repository item does not contain the specific value.
Public methodStatic memberAttributeNotContains(IElement, String, String, String, ValidateOptions)
Validates if the attribute of the specified element does not contain the specific value.
Public methodStatic memberAttributeNotContains(IElement, String, String, String, Boolean)
Validates if the attribute of the specified element does not contain the specific value.
Public methodStatic memberAttributeNotContains(RepoItemInfo, String, String, String, ValidateOptions)
Validates if the attribute of the element for the specified repository item does not contain the specific value.
Public methodStatic memberAttributeNotContains(RepoItemInfo, String, String, String, Boolean)
Validates if the attribute of the element for the specified repository item does not contain the specific value.
Public methodStatic memberAttributeNotEqual(IElement, String, Object)
Validates if the attribute of the specified element does not match a specific value.
Public methodStatic memberAttributeNotEqual(RepoItemInfo, String, Object)
Validates if the attribute of the element for the specified repository item does not match a specific value.
Public methodStatic memberAttributeNotEqual(IElement, String, Object, String)
Validates if the attribute of the specified element does not match a specific value.
Public methodStatic memberAttributeNotEqual(RepoItemInfo, String, Object, String)
Validates if the attribute of the element for the specified repository item does not match a specific value.
Public methodStatic memberAttributeNotEqual(IElement, String, Object, String, ValidateOptions)
Validates if the attribute of the specified element does not match a specific value.
Public methodStatic memberAttributeNotEqual(IElement, String, Object, String, Boolean)
Validates if the attribute of the specified element does not match a specific value.
Public methodStatic memberAttributeNotEqual(RepoItemInfo, String, Object, String, ValidateOptions)
Validates if the attribute of the element for the specified repository item does not match a specific value.
Public methodStatic memberAttributeNotEqual(RepoItemInfo, String, Object, String, Boolean)
Validates if the attribute of the element for the specified repository item does not match a specific value.
Public methodStatic memberAttributeRegex(IElement, String, Regex)
Validates if the attribute of the specified element matches a specific regular expression.
Public methodStatic memberAttributeRegex(RepoItemInfo, String, Regex)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Public methodStatic memberAttributeRegex(IElement, String, Regex, String)
Validates if the attribute of the specified element matches a specific regular expression.
Public methodStatic memberAttributeRegex(RepoItemInfo, String, Regex, String)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Public methodStatic memberAttributeRegex(IElement, String, Regex, String, ValidateOptions)
Validates if the attribute of the specified element matches a specific regular expression.
Public methodStatic memberAttributeRegex(IElement, String, Regex, String, Boolean)
Validates if the attribute of the specified element matches a specific regular expression.
Public methodStatic memberAttributeRegex(RepoItemInfo, String, Regex, String, ValidateOptions)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Public methodStatic memberAttributeRegex(RepoItemInfo, String, Regex, String, Boolean)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
Public methodStatic memberCompareImage(Element, Bitmap, ImagingFindOptions)
Validates if the screenshot of the specified element matches the given image.
Public methodStatic memberCompareImage(RepoItemInfo, Bitmap, ImagingFindOptions)
Validates if the screenshot of the specified repository item matches the given image.
Public methodStatic memberCompareImage(Element, Bitmap, ImagingFindOptions, String)
Validates if the screenshot of the specified element matches the given image.
Public methodStatic memberCompareImage(RepoItemInfo, Bitmap, ImagingFindOptions, String)
Validates if the screenshot of the specified repository item matches the given image.
Public methodStatic memberCompareImage(Bitmap, Bitmap, ImagingFindOptions, String, ValidateOptions)
Compares two images to validate if they match within specified tolerance.
Public methodStatic memberCompareImage(Element, Bitmap, ImagingFindOptions, String, ValidateOptions)
Validates if the screenshot of the specified element matches the given image.
Public methodStatic memberCompareImage(Element, Bitmap, ImagingFindOptions, String, Boolean)
Validates if the screenshot of the specified element matches the given image.
Public methodStatic memberCompareImage(RepoItemInfo, Bitmap, ImagingFindOptions, String, ValidateOptions)
Validates if the screenshot of the specified repository item matches the given image.
Public methodStatic memberCompareImage(RepoItemInfo, Bitmap, ImagingFindOptions, String, Boolean)
Validates if the screenshot of the specified repository item matches the given image.
Public methodStatic memberContainsImage(Element, Bitmap, ImagingFindOptions)
Validates if the screenshot of the specified element contains the given image.
Public methodStatic memberContainsImage(RepoItemInfo, Bitmap, ImagingFindOptions)
Validates if the screenshot of the specified repository item contains the given image.
Public methodStatic memberContainsImage(Element, Bitmap, ImagingFindOptions, String)
Validates if the screenshot of the specified element contains the given image.
Public methodStatic memberContainsImage(RepoItemInfo, Bitmap, ImagingFindOptions, String)
Validates if the screenshot of the specified repository item contains the given image.
Public methodStatic memberContainsImage(Element, Bitmap, ImagingFindOptions, String, ValidateOptions)
Validates if the screenshot of the specified element contains the given image.
Public methodStatic memberContainsImage(Element, Bitmap, ImagingFindOptions, String, Boolean)
Validates if the screenshot of the specified element contains the given image.
Public methodStatic memberContainsImage(RepoItemInfo, Bitmap, ImagingFindOptions, String, ValidateOptions)
Validates if the screenshot of the specified repository item contains the given image.
Public methodStatic memberContainsImage(RepoItemInfo, Bitmap, ImagingFindOptions, String, Boolean)
Validates if the screenshot of the specified repository item contains the given image.
Public methodStatic memberExists(String)
Validates if the element for the specified path exists using the DefaultSearchTimeout to keep looking for an element matching the path.
Public methodStatic memberExists(Element)
Validates if the specified element exists.
Public methodStatic memberExists(RepoItemInfo)
Validates if the element for the specified repository item exists.
Public methodStatic memberExists(RxPath)
Validates if the element for the specified path exists using the DefaultSearchTimeout to keep looking for an element matching the path.
Public methodStatic memberExists(String, Duration)
Validates if the element for the specified path exists.
Public methodStatic memberExists(Element, String)
Validates if the specified element exists.
Public methodStatic memberExists(RepoItemInfo, String)
Validates if the element for the specified repository item exists.
Public methodStatic memberExists(RxPath, Duration)
Validates if the element for the specified path exists.
Public methodStatic memberExists(String, Duration, String)
Validates if the element for the specified path exists.
Public methodStatic memberExists(Element, String, ValidateOptions)
Validates if the specified element exists.
Public methodStatic memberExists(Element, String, Boolean)
Validates if the specified element exists.
Public methodStatic memberExists(RepoItemInfo, String, ValidateOptions)
Validates if the element for the specified repository item exists.
Public methodStatic memberExists(RepoItemInfo, String, Boolean)
Validates if the element for the specified repository item exists.
Public methodStatic memberExists(RxPath, Duration, String)
Validates if the element for the specified path exists.
Public methodStatic memberExists(String, Duration, String, ValidateOptions)
Validates if the element for the specified path exists.
Public methodStatic memberExists(String, Duration, String, Boolean)
Validates if the element for the specified path exists.
Public methodStatic memberExists(RxPath, Duration, String, ValidateOptions)
Validates if the element for the specified path exists.
Public methodStatic memberExists(RxPath, Duration, String, Boolean)
Validates if the element for the specified path exists.
Public methodStatic memberFail
Always lets the validation fail.
Public methodStatic memberFail(String)
Always lets the validation fail.
Public methodStatic memberFail(String, ValidateOptions)
Always lets the validation fail.
Public methodStatic memberIsFalse(Boolean)
Validates if the given condition is false.
Public methodStatic memberIsFalse(Boolean, String)
Validates if the given condition is false.
Public methodStatic memberIsFalse(Boolean, String, ValidateOptions)
Validates if the given condition is false.
Public methodStatic memberIsFalse(Boolean, String, Boolean)
Validates if the given condition is false.
Public methodStatic memberIsTrue(Boolean)
Validates if the given condition is true.
Public methodStatic memberIsTrue(Boolean, String)
Validates if the given condition is true.
Public methodStatic memberIsTrue(Boolean, String, ValidateOptions)
Validates if the given condition is true.
Public methodStatic memberIsTrue(Boolean, String, Boolean)
Validates if the given condition is true.
Public methodStatic memberNotExists(String)
Validates if the element for the specified path does not exist using the DefaultSearchTimeout to keep looking for an element matching the path.
Public methodStatic memberNotExists(Element)
Validates if the specified element does not exist.
Public methodStatic memberNotExists(RepoItemInfo)
Validates if the element for the specified repository item does not exist.
Public methodStatic memberNotExists(RxPath)
Validates if the element for the specified path does not exist using the DefaultSearchTimeout to keep looking for an element matching the path.
Public methodStatic memberNotExists(String, Duration)
Validates if the element for the specified path does not exist.
Public methodStatic memberNotExists(Element, String)
Validates if the specified element does not exist.
Public methodStatic memberNotExists(RepoItemInfo, String)
Validates if the element for the specified repository item does not exist.
Public methodStatic memberNotExists(RxPath, Duration)
Validates if the element for the specified path does not exist.
Public methodStatic memberNotExists(String, Duration, String)
Validates if the element for the specified path does not exist.
Public methodStatic memberNotExists(Element, String, ValidateOptions)
Validates if the specified element does not exist.
Public methodStatic memberNotExists(Element, String, Boolean)
Validates if the specified element does not exist.
Public methodStatic memberNotExists(RepoItemInfo, String, ValidateOptions)
Validates if the element for the specified repository item does not exist.
Public methodStatic memberNotExists(RepoItemInfo, String, Boolean)
Validates if the element for the specified repository item does not exist.
Public methodStatic memberNotExists(RxPath, Duration, String)
Validates if the element for the specified path does not exist.
Public methodStatic memberNotExists(String, Duration, String, ValidateOptions)
Validates if the element for the specified path does not exist.
Public methodStatic memberNotExists(String, Duration, String, Boolean)
Validates if the element for the specified path does not exist.
Public methodStatic memberNotExists(RxPath, Duration, String, ValidateOptions)
Validates if the element for the specified path does not exist.
Public methodStatic memberNotExists(RxPath, Duration, String, Boolean)
Validates if the element for the specified path does not exist.
Top
Fields
  NameDescription
Public fieldStatic memberDefaultMessage
Use the value of this property to specify that the default validation message should be used.
Top
Remarks
You can use the following variables in messages you pass to the Validate methods that are replaced by the following values depending on the result of the validation:
VariableValue if validation succeedsValue if the validation fails
"@ValidateRESULT@""succeeded""failed"
"@ValidateNOT@""""not "
"@ValidateTRUENOT@""not """
For example, the following message will be transformed according to the outcome of the validation:
bool condition = true;
Validate.IsTrue(condition, "The validation @ValidateRESULT@.");
See Also