activities
latest
false
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique.
Activités de workflow
Last updated 22 oct. 2024

TestingOptions.CompareDocuments Class

Use this class to configure options for comparing documents with the VerifyDocumentsEquivalence API.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

Syntaxe

public class TestingOptions : CompareDocumentspublic class TestingOptions : CompareDocuments

Constructeurs

public TestingOptions.CompareDocuments()public TestingOptions.CompareDocuments()
TestingOptions.CompareDocuments
Initialise une nouvelle instance de la classe TestingOptions.CompareDocuments .

Propriétés

AdditionalOutputFilePath Chaîne de caractères (string)
Path to the additional output file. Needs to be set if OutputDiffType is PDF.
ContinueOnError Booléen
Précise si l’automatisation doit se poursuivre même si la méthode génère une erreur. Ce paramètre prend uniquement en charge les valeurs booléennes (true, false). La valeur par défaut est alse. Par conséquent, si le paramètre est vide et qu’une erreur est générée, l’exécution du projet s’arrête. Si le champ indique au true, l'exécution du projet se poursuit même en cas d'erreur.
IgnoreIdenticalItems Booléen
If set to True, identical items are ignored during comparison. This is useful when comparing static objects, such as watermarks or headers. By default, this is set to true.
IgnoreImagesLocation Booléen
If set to true, ignores the location of an image in the compared documents. By default, this is set to false.
IncludeImages Booléen
If set to true, the comparison process includes images, as well. By default, this is set to true.
OutputDiffType DocumentOutputDiffType
The type you want to use for returning the differences between the documents.
OutputFilePath Chaîne de caractères (string)
The output path of the base document.
Règles List<ComparisonRule>
List of rules to be applied. They can be of type RegexRule or WildcardRule.
WordSeparators Chaîne de caractères (string)
The objects, as Strings, that you want to consider as word separators in the comparison process. For example, if the documents you are comparing commonly use a period (.) or backslashes (/) for separating words, then you can define these as word separators.

Méthodes

These are the methods you can use to configure the document comparison options.

WithContinueOnError

Configure if the automation should continue even when the method throws an error.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithContinueOnError(bool)

WithIgnoreRegexRule(
    bool continueOnError
)WithIgnoreRegexRule(
    bool continueOnError
)
continueOnError Booléen
Précise si l’automatisation doit se poursuivre même si la méthode génère une erreur. Ce paramètre prend uniquement en charge les valeurs booléennes (true, false). La valeur par défaut est false. Par conséquent, si le paramètre est vide et qu’une erreur est générée, l’exécution du projet s’arrête. Si le champ indique au true, l'exécution du projet se poursuit même en cas d'erreur.

WithGenerateHtml

Generates an HTML file with the highlighted differences identified between the two documents or texts.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithGenerateHtml(string)

WithGenerateHtml(
    string filePath
)WithGenerateHtml(
    string filePath
)
CheminFichier Chaîne de caractères (string)
The path of the HTML file that stores the differences identified when comparing the documents or texts.

WithGeneratePDF

Generates new PDF files with the highlighted differences for both the baseline document and the target document, used to compare against the baseline document.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithGeneratePDF(string, string)

WithGeneratePDF(
    string baselinePath,
    string targetPath
)WithGeneratePDF(
    string baselinePath,
    string targetPath
)
baselinePath Chaîne de caractères (string)
The new path of the baseline document, where you want to store the PDF file that highlighted the identified differences.
targetPath Chaîne de caractères (string)
The new path of the target document, where you want to store the PDF file that highlighted the identified differences.

WithIgnoreIdenticalItems

If set to True, identical lines are ignored during comparison. This is useful, in particular, when comparing static objects, such as watermarks or headers.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithIgnoreIdenticalItems(bool)

CompareDocumentsOptions WithIgnoreIdenticalItems<CompareDocumentsOptions>( 
    bool ignoreIdenticalItems = true
)CompareDocumentsOptions WithIgnoreIdenticalItems<CompareDocumentsOptions>( 
    bool ignoreIdenticalItems = true
)
ignoreIdenticalItems Booléen
Specifies if identical items should be ignored during comparison. By default, this parameter is set to true.

WithIgnoreImagesPageAndPosition

If set to true, ignores the position and page of an image.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithIgnoreImagesPageAndPosition(this, bool)

WithIgnoreImagesPageAndPosition(
    bool ignoreImagesPageAndPosition = false
)WithIgnoreImagesPageAndPosition(
    bool ignoreImagesPageAndPosition = false
)
ignoreImagesPageAndPosition Booléen
If set to true, ignores the position and page of an image. By default, the value of the parameter is false.

WithIgnoreRegexRule

If set to True, ignores any Regex rule that you configured for the Rules parameter. This allows you to exclude certain parts of the texts or documents that you are comparing.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithIgnoreRegexRule(string, string, [bool])

WithIgnoreRegexRule(
    string ruleName,
    string regexPattern,
    [bool usePlaceholders = true]
)WithIgnoreRegexRule(
    string ruleName,
    string regexPattern,
    [bool usePlaceholders = true]
)
ruleName Chaîne de caractères (string)
The name of the rule, as you configured it in the list of Rules, that you want to ignore in the comparison process.
regexPattern Chaîne de caractères (string)
The actual regex that represents the ruleName previously entered.
usePlaceholder Booléen (facultatif)
If set to True it replaces the ignored part of a document or text with a placeholder value. The placeholder value is the ruleName. By default, this parameter is set to true.

WithIgnoreWildcardRule

If set to True, ignores any wild card rule that you configured for the Rules parameter. This allows you to exclude certain parts of the texts or documents that you are comparing.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithIgnoreWildcardRule(string, string, bool)

WithIgnoreWildcardRule(
    string ruleName,
    string wildcardPattern,
    [bool usePlaceholder = true]
)WithIgnoreWildcardRule(
    string ruleName,
    string wildcardPattern,
    [bool usePlaceholder = true]
)
ruleName Chaîne de caractères (string)
The name of the rule, as you configured it in the list of Rules, that you want to ignore in the comparison process.
wildcardPattern Chaîne de caractères (string)
The actual wildcard that represents the ruleName previously entered.
usePlaceholder Booléen (facultatif)
If set to True it replaces the ignored part of a document or text with a placeholder value. The placeholder value is the ruleName. By default, this parameter is set to true.

WithIncludeImages

Includes images in the comparison process. If you set this method to True, it also compares images, when verifying the equivalence between documents or texts.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithIncludeImages(bool)

WithIncludeImages(
    bool includeImages
)WithIncludeImages(
    bool includeImages
)
includeImages Booléen
If set to True, the API also compares images when verifying the equivalence between documents and texts.

WithWordSeparators

Specify the characters that you want to define as word separators. The characters must be stored in a string.

Définition

Namespace: UiPath.Testing.API.Models

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

WithWordSeparators(string)

WithWordSeparators(
    string wordSeparators
)WithWordSeparators(
    string wordSeparators
)
wordSeparators Chaîne de caractères (string)
The string containing the characters that you want to consider as word separators.

Cette page vous a-t-elle été utile ?

Obtenez l'aide dont vous avez besoin
Formation RPA - Cours d'automatisation
Forum de la communauté UiPath
Uipath Logo White
Confiance et sécurité
© 2005-2024 UiPath Tous droits réservés.