ClassContentVerificationDescriptor
Class that performs and persists a text based verification
Definition
Namespace:ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors
Assembly:ArtOfTest.WebAii.Design.dll
Syntax:
[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:
Inherited Members
Constructors
ContentVerificationDescriptor()
Empty constructor - (For Serialization)
Declaration
public ContentVerificationDescriptor()
ContentVerificationDescriptor(Element, StringCompareType, FindContentType, string)
Initialize a new text verification
Declaration
public ContentVerificationDescriptor(Element target, StringCompareType compare, FindContentType tagSegmentType, string expectedString)
Parameters
target
compare
tagSegmentType
expectedString
Properties
CompareType
Compare Type to do the text verification
Declaration
[DataMember(Name = "CompareType")]
[SentenceParam("compare?", AutomationDescriptorType.Extraction)]
public StringCompareType CompareType { get; set; }
Property Value
ExpectedString
The expected string to compare against
Declaration
[DataMember(Name = "ExpectedString")]
[DataDriven]
[SentenceParam("value?", AutomationDescriptorType.Extraction, IsExtractedValue = true)]
public string ExpectedString { get; set; }
Property Value
FriendlyDescription
Gets the friendly description of this verification descriptor.
Declaration
public override string FriendlyDescription { get; }
Property Value
Overrides
PrimaryTargetKey
Gets the primary target key
Declaration
public override string PrimaryTargetKey { get; }
Property Value
Overrides
TagSegmentType
The segement of the target element to compare
Declaration
[DataMember(Name = "SegmentType")]
[SentenceParam("content?", AutomationDescriptorType.Extraction)]
public FindContentType TagSegmentType { get; set; }
Property Value
Methods
ExtractData(IAutomationHost, DescriptorValueStore)
Extract verification data from the live Targets.
Declaration
public override void ExtractData(IAutomationHost targetBrowser, DescriptorValueStore dataStore)
Parameters
targetBrowser
The target browser.
dataStore
Overrides
GeneratePreviewValuesForTarget(DescriptorValueStoreCollection)
Given a target element, generate an array of values for the descriptor implementing this interface.
Declaration
public void GeneratePreviewValuesForTarget(DescriptorValueStoreCollection valuesCollection)
Parameters
valuesCollection
DescriptorValueStoreCollection
Collection to add values to
Implements
GetExtendedEditorInfo(DescriptorValueStore)
Collect additional values for each parameter to be used by the editor
Declaration
public void GetExtendedEditorInfo(DescriptorValueStore valueStore)
Parameters
valueStore
The value store to add values in
Implements
GetQuickTasks()
Declaration
public virtual IQuickTask[] GetQuickTasks()
Returns
Implements
OnParameterChanged(SentenceParam, Sentence)
Called when a parameter value has changed
Declaration
public void OnParameterChanged(SentenceParam param, Sentence context)
Parameters
param
The parameter that changed
context
The context/sentence that this parameter is part of.
Implements
OnSentenceLoad(Sentence)
Called when the sentence is first loaded. Allows for setting initial values for each sentence if needed
Declaration
public void OnSentenceLoad(Sentence context)
Parameters
context
The sentence context.
Implements
ToCode()
Convert this descriptor to code.
Declaration
public override void ToCode()
Overrides
Verify(DescriptorValueStore)
Given a value store, verify against the constraints defined by this descriptor
Declaration
public override VerificationResult Verify(DescriptorValueStore dataStore)
Parameters
dataStore
The data store were values are captured
Returns
The verification result.
Overrides