activities
latest
false
重要 :
请注意此内容已使用机器翻译进行了部分本地化。
工作流活动
Last updated 2024年10月22日

TestingOptions.CompareText Class

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

定义

Namespace: UiPath.Testing.API.Models

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

语法

public class TestingOptions : CompareTextpublic class TestingOptions : CompareText

构造函数

public TestingOptions.CompareDocuments()public TestingOptions.CompareDocuments()
TestingOptions.CompareText
初始化“ TestingOptions.CompareText ”类的新实例。

属性

AdditionalOutputFilePath 字符串
Path to the additional output file. Needs to be set if OutputDiffType is PDF.
ContinueOnError 布尔值
Specifies if the automation should continue even when the method throws an error.
OutputDiffType DocumentOutputDiffType
The format in which you want to show the differences between texts.
OutputFilePath 字符串
The path to the output file that shows the differences between texts.
规则 列表<ComparisonRule>
List of rules to be applied. They can be of type RegexRule or WildcardRule.
WordSeparators 字符串
The characters that should be considered as word separators in the comparison process. For example, if the texts you are comparing commonly use a period (.) or backslashes (/) for separating words, then you can define these as word separators. By default, the separators are ". , ! ? : \n".

方法

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

WithContinueOnError

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

定义

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 布尔值
指定在方法抛出错误时是否应继续自动化。 此参数仅支持布尔值( truefalse )。 默认值为false 。 因此,如果参数为空且活动引发错误,系统将停止执行项目。 如果该值设为true ,则无论出现何种错误,系统都将继续执行项目。

WithGenerateHtml

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

定义

Namespace: UiPath.Testing.API.Models

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

WithGenerateHtml(string)

WithGenerateHtml(
    string filePath
)WithGenerateHtml(
    string filePath
)
文件路径 字符串
The path of the HTML file that stores the differences identified when comparing the documents or texts.

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.

定义

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 字符串
The name of the rule, as you configured it in the list of Rules, that you want to ignore in the comparison process.
regexPattern 字符串
The actual regex that represents the ruleName previously entered.
usePlaceholder 布尔值(可选)
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.

定义

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 字符串
The name of the rule, as you configured it in the list of Rules, that you want to ignore in the comparison process.
wildcardPattern 字符串
The actual wildcard that represents the ruleName previously entered.
usePlaceholder 布尔值(可选)
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.

WithWordSeparators

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

定义

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 字符串
The string containing the characters that you want to consider as word separators.
  • 定义
  • 语法
  • 构造函数
  • 属性
  • 方法
  • WithContinueOnError
  • WithGenerateHtml
  • WithIgnoreRegexRule
  • WithIgnoreWildcardRule
  • WithWordSeparators

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。