Class
ContentVerificationDescriptor

Class that performs and persists a text based verification

Definition

Namespace:ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
[DataContract(Namespace = "http://artoftest.com/schemas/WebAiiDesignCanvas/1.0.0")]
[Sentence("Content", "Verify {TagSegmentType} {CompareType} {ExpectedString}", false)]
[SupportsImageCapture(true)]
public class ContentVerificationDescriptor : HtmlVerificationDescriptor, INotifyPropertyChanged, ICustomTypeDescriptor, IExtensibleDataObject, IInspectWebSettings, IQuickTasks, IExtendedParamEditorInfo, ISentenceListPreview

Inheritance: objectDataBoundObjectAutomationDescriptorVerificationDescriptorHtmlVerificationDescriptorContentVerificationDescriptor

Implements: ICustomTypeDescriptorIExtendedParamEditorInfoIExtensibleDataObjectIInspectWebSettingsINotifyPropertyChangedIQuickTasksISentenceListPreview

Inherited Members HtmlVerificationDescriptor.CreateElementFindExpression(string)HtmlVerificationDescriptor.InspectWebSettings(UserSettings)HtmlVerificationDescriptor.TechnologyTypeHtmlVerificationDescriptor.PrimaryHtmlTargetHtmlVerificationDescriptor.PrimaryTargetHtmlVerificationDescriptor.SecondaryTargetVerificationDescriptor.EnsureTargetsAreCurrent()VerificationDescriptor.PerformWait(IAutomationHost)VerificationDescriptor.SetRole(VerificationDescriptorRole)VerificationDescriptor.GetDescriptionPrefix()VerificationDescriptor.DataBindVariableNameVerificationDescriptor.TimeoutVerificationDescriptor.CheckIntervalVerificationDescriptor.EnsureStateIsCurrentVerificationDescriptor.SupportsWaitVerificationDescriptor.IsWaitOnlyVerificationDescriptor.SupportsExtractionVerificationDescriptor.SupportsConvertToCodeAutomationDescriptor._elementDescriptorsAutomationDescriptor._dataBindingExpressionsAutomationDescriptor._typeAutomationDescriptor._waitOnElementsExistFirstAutomationDescriptor._searchByImageFirstAutomationDescriptor._waitOnElementsExistTimeoutAutomationDescriptor._pauseTypeAutomationDescriptor._testMethodAutomationDescriptor._editorTypeAutomationDescriptor._quickTasksAutomationDescriptor._targetsAutomationDescriptor._hasQuickTaskAutomationDescriptor._dynamicReadOnlyPropertiesAutomationDescriptor._dynamicVisibilityPropertiesAutomationDescriptor.OnBeforeElementDescriptorAdded(string, ITargetElement, FindExpressionElement)AutomationDescriptor.OnBeforeConfirmRecording(object)AutomationDescriptor.GetProjectLanguage()AutomationDescriptor.Clone()AutomationDescriptor.UsesTarget(string)AutomationDescriptor.HasRequiredValue(string, object)AutomationDescriptor.IsDataBound(string)AutomationDescriptor.BindData(string)AutomationDescriptor.BindDataCode(string, string, Type)AutomationDescriptor.ChangeTarget(ElementDescriptor, string)AutomationDescriptor.GetParentsReference(ElementDescriptor)AutomationDescriptor.CreateElementReference(string)AutomationDescriptor.CreateElementReference(string, bool, int)AutomationDescriptor.GetValidVariableName(string)AutomationDescriptor.GetNumberedVariableName(string)AutomationDescriptor.InvokeMethod(string, string, params object[])AutomationDescriptor.InvokeMethod(string, string, CodeGenerationLanguage, params object[])AutomationDescriptor.InvokeMethod(string, Type, bool, string, params object[])AutomationDescriptor.InvokeMethod(string, Type, bool, string, CodeGenerationLanguage, params object[])AutomationDescriptor.InvokeMethod(string, bool, string, params object[])AutomationDescriptor.InvokeMethod(string, bool, string, CodeGenerationLanguage, params object[])AutomationDescriptor.InvokeMethod(CodeExpression, bool, string, params object[])AutomationDescriptor.InvokeMethod(CodeExpression, bool, string, CodeGenerationLanguage, params object[])AutomationDescriptor.InvokeWaitForExistsMethod(CodeExpression)AutomationDescriptor.ParseParameters(object[], out bool, CodeGenerationLanguage)AutomationDescriptor.InvokeWaitMethod(string, Type, int, int, CodeExpression)AutomationDescriptor.InvokeWaitMethod(string, Type, int, int, CodeExpression, CodeGenerationLanguage)AutomationDescriptor.GenerateLambdaVariableRef()AutomationDescriptor.GenerateLambdaVariableRef(int)AutomationDescriptor.GenerateLambdaExpression(CodeVariableReferenceExpression, CodeExpression, bool)AutomationDescriptor.GenerateLambdaExpression(CodeVariableReferenceExpression[], CodeExpression, bool)AutomationDescriptor.GenerateTernaryExpression(CodeExpression, CodeExpression, CodeExpression)AutomationDescriptor.GetLambdaVariableReference()AutomationDescriptor.GetLambdaExpression(CodeGenerationLanguage, CodeExpression)AutomationDescriptor.GetLambdaExpression(CodeGenerationLanguage, CodeExpression, bool)AutomationDescriptor.GetNoParamLamdaExpression(CodeGenerationLanguage, CodeExpression)AutomationDescriptor.InvokeWaitMethod(string, Type, int, int, string, params object[])AutomationDescriptor.InvokeWaitMethod(string, Type, int, int, string, CodeGenerationLanguage, params object[])AutomationDescriptor.SetProperty(string, Type, object)AutomationDescriptor.SetProperty(string, Type, object, CodeGenerationLanguage)AutomationDescriptor.SetProperty(CodeExpression, object)AutomationDescriptor.SetProperty(CodeExpression, object, CodeGenerationLanguage)AutomationDescriptor.NotifyElementNameChange(ElementDescriptor)AutomationDescriptor.GetHashCode()AutomationDescriptor.OnPropertyChanged(string)AutomationDescriptor.GetAttributes()AutomationDescriptor.GetClassName()AutomationDescriptor.GetComponentName()AutomationDescriptor.GetConverter()AutomationDescriptor.GetDefaultEvent()AutomationDescriptor.GetDefaultProperty()AutomationDescriptor.GetEditor(Type)AutomationDescriptor.GetEvents(Attribute[])AutomationDescriptor.GetEvents()AutomationDescriptor.GetProperties(Attribute[])AutomationDescriptor.GetProperties()AutomationDescriptor.GetPropertyOwner(PropertyDescriptor)AutomationDescriptor.AreSameIncludingElements(AutomationDescriptor, AutomationDescriptor)AutomationDescriptor.ConsolidateText(string, string)AutomationDescriptor.ConsolidateText(string, string, TextTypingInfo)AutomationDescriptor.ToString()AutomationDescriptor.CreateControlFromTarget<TControl>(string, int)AutomationDescriptor.CreateControlFromElement<TControl>(Element, int)AutomationDescriptor.SupportsElementType(Type)AutomationDescriptor.PrimaryPropertiesAutomationDescriptor.RequiredAssemblyReferencesAutomationDescriptor.SecondaryTargetKeyAutomationDescriptor.PauseAutomationDescriptor.DontUseDomStateAutomationDescriptor.WaitOnElementsTimeoutAutomationDescriptor.SearchByImageFirstAutomationDescriptor.UseStepWaitOnElementsTimoutAutomationDescriptor.WaitOnElementsAutomationDescriptor.RunsAgainstAutomationDescriptor.RunsAgainstVersionAutomationDescriptor.RunsAgainstVersionCompareAutomationDescriptor.ConstraintsAutomationDescriptor.IsSearchByImageApllicableAutomationDescriptor.TargetsAutomationDescriptor.ElementDescriptorsAutomationDescriptor.HasQuickTasksAutomationDescriptor.QuickTasksAutomationDescriptor.StepTypeAutomationDescriptor.LogMessageOnFailureAutomationDescriptor.TestMethodAutomationDescriptor.EditorTypeAutomationDescriptor.EditorTypeStringAutomationDescriptor.DataBindingExpressionsAutomationDescriptor.DynamicReadOnlyPropertiesAutomationDescriptor.DynamicVisibilityPropertiesAutomationDescriptor.TargetsCustomControlTypesAutomationDescriptor.CustomOrFriendlyDescriptionAutomationDescriptor.DescriptorTypeAutomationDescriptor.CodeGenModeAutomationDescriptor.TargetSearchAlgorithmAutomationDescriptor.ExtensionDataAutomationDescriptor.PropertyChangedDataBoundObject._dataDataBoundObject.BindData<T>(string)DataBoundObject.BindDataCode(string)DataBoundObject.BindDataCode(string, PropertyInfo)DataBoundObject.Data

Constructors

ContentVerificationDescriptor()

Empty constructor - (For Serialization)

Declaration

cs-api-definition
public ContentVerificationDescriptor()

ContentVerificationDescriptor(Element, StringCompareType, FindContentType, string)

Initialize a new text verification

Declaration

cs-api-definition
public ContentVerificationDescriptor(Element target, StringCompareType compare, FindContentType tagSegmentType, string expectedString)

Parameters

target

Element

compare

StringCompareType

tagSegmentType

FindContentType

expectedString

string

Properties

CompareType

Compare Type to do the text verification

Declaration

cs-api-definition
[DataMember(Name = "CompareType")]
[SentenceParam("compare?", AutomationDescriptorType.Extraction)]
public StringCompareType CompareType { get; set; }

Property Value

StringCompareType

ExpectedString

The expected string to compare against

Declaration

cs-api-definition
[DataMember(Name = "ExpectedString")]
[DataDriven]
[SentenceParam("value?", AutomationDescriptorType.Extraction, IsExtractedValue = true)]
public string ExpectedString { get; set; }

Property Value

string

FriendlyDescription

Gets the friendly description of this verification descriptor.

Declaration

cs-api-definition
public override string FriendlyDescription { get; }

Property Value

string

Overrides AutomationDescriptor.FriendlyDescription

PrimaryTargetKey

Gets the primary target key

Declaration

cs-api-definition
public override string PrimaryTargetKey { get; }

Property Value

string

Overrides AutomationDescriptor.PrimaryTargetKey

TagSegmentType

The segement of the target element to compare

Declaration

cs-api-definition
[DataMember(Name = "SegmentType")]
[SentenceParam("content?", AutomationDescriptorType.Extraction)]
public FindContentType TagSegmentType { get; set; }

Property Value

FindContentType

Methods

ExtractData(IAutomationHost, DescriptorValueStore)

Extract verification data from the live Targets.

Declaration

cs-api-definition
public override void ExtractData(IAutomationHost targetBrowser, DescriptorValueStore dataStore)

Parameters

targetBrowser

IAutomationHost

The target browser.

dataStore

DescriptorValueStore

Overrides VerificationDescriptor.ExtractData(IAutomationHost, DescriptorValueStore)

GeneratePreviewValuesForTarget(DescriptorValueStoreCollection)

Given a target element, generate an array of values for the descriptor implementing this interface.

Declaration

cs-api-definition
public void GeneratePreviewValuesForTarget(DescriptorValueStoreCollection valuesCollection)

Parameters

valuesCollection

DescriptorValueStoreCollection

Collection to add values to

Implements ISentenceListPreview.GeneratePreviewValuesForTarget(DescriptorValueStoreCollection)

GetExtendedEditorInfo(DescriptorValueStore)

Collect additional values for each parameter to be used by the editor

Declaration

cs-api-definition
public void GetExtendedEditorInfo(DescriptorValueStore valueStore)

Parameters

valueStore

DescriptorValueStore

The value store to add values in

Implements IExtendedParamEditorInfo.GetExtendedEditorInfo(DescriptorValueStore)

GetQuickTasks()

Declaration

cs-api-definition
public virtual IQuickTask[] GetQuickTasks()

Returns

IQuickTask[]

Implements IQuickTasks.GetQuickTasks()

OnParameterChanged(SentenceParam, Sentence)

Called when a parameter value has changed

Declaration

cs-api-definition
public void OnParameterChanged(SentenceParam param, Sentence context)

Parameters

param

SentenceParam

The parameter that changed

context

Sentence

The context/sentence that this parameter is part of.

Implements IExtendedParamEditorInfo.OnParameterChanged(SentenceParam, Sentence)

OnSentenceLoad(Sentence)

Called when the sentence is first loaded. Allows for setting initial values for each sentence if needed

Declaration

cs-api-definition
public void OnSentenceLoad(Sentence context)

Parameters

context

Sentence

The sentence context.

Implements IExtendedParamEditorInfo.OnSentenceLoad(Sentence)

ToCode()

Convert this descriptor to code.

Declaration

cs-api-definition
public override void ToCode()

Overrides AutomationDescriptor.ToCode()

Verify(DescriptorValueStore)

Given a value store, verify against the constraints defined by this descriptor

Declaration

cs-api-definition
public override VerificationResult Verify(DescriptorValueStore dataStore)

Parameters

dataStore

DescriptorValueStore

The data store were values are captured

Returns

VerificationResult

The verification result.

Overrides VerificationDescriptor.Verify(DescriptorValueStore)