Class
TextBlockDisplayedTextVerificationDescriptor

Verify displayed text of TextBlock

Definition

Namespace:ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
[DataContract(Namespace = "http://artoftest.com/schemas/WebAiiDesignCanvas/2.0.0")]
[Sentence("Displayed Text", " displayed text {Comparison} {Value}", false)]
public class TextBlockDisplayedTextVerificationDescriptor : XamlVerificationDescriptor, INotifyPropertyChanged, ICustomTypeDescriptor, IExtensibleDataObject, IInspectWebSettings, IQuickTasks, ISentenceListPreview, IExtendedParamEditorInfo

Inheritance: objectDataBoundObjectAutomationDescriptorVerificationDescriptorXamlVerificationDescriptorTextBlockDisplayedTextVerificationDescriptor

Implements: ICustomTypeDescriptorIExtendedParamEditorInfoIExtensibleDataObjectIInspectWebSettingsINotifyPropertyChangedIQuickTasksISentenceListPreview

Inherited Members XamlVerificationDescriptor.ExtractData(IAutomationHost, DescriptorValueStore)XamlVerificationDescriptor.GenerateWaitFor(CodeExpression, CodeExpression, CodeExpression)XamlVerificationDescriptor.CreateElementFindExpression(string)XamlVerificationDescriptor.InspectWebSettings(UserSettings)XamlVerificationDescriptor.SearchByImageFirstXamlVerificationDescriptor.TechnologyTypeXamlVerificationDescriptor.WaitForNoMotionXamlVerificationDescriptor.WaitForNoMotionCheckIntervalXamlVerificationDescriptor.PrimaryTargetXamlVerificationDescriptor.SecondaryTargetXamlVerificationDescriptor.VirtualizingContainerXamlVerificationDescriptor.VirtualizingContainerOffsetVerificationDescriptor.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.PrimaryTargetKeyAutomationDescriptor.SecondaryTargetKeyAutomationDescriptor.PauseAutomationDescriptor.DontUseDomStateAutomationDescriptor.WaitOnElementsTimeoutAutomationDescriptor.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

TextBlockDisplayedTextVerificationDescriptor()

Create new instance of TextBlockDisplayedTextVerificationDescriptor class.

Declaration

cs-api-definition
public TextBlockDisplayedTextVerificationDescriptor()

TextBlockDisplayedTextVerificationDescriptor(IFrameworkElement, string, string)

Create a new TextBlockVerificationDescriptor

Declaration

cs-api-definition
public TextBlockDisplayedTextVerificationDescriptor(IFrameworkElement textBlock, string comparison, string expected)

Parameters

textBlock

IFrameworkElement

The target TextBlock

comparison

string

expected

string

The string that the target is expected to contain

Properties

Comparer

Declaration

cs-api-definition
[Browsable(false)]
[DataMember(Name = "Comparer")]
protected virtual VerificationComparer Comparer { get; set; }

Property Value

VerificationComparer

Comparison

Declaration

cs-api-definition
[DataMember(Name = "Comparison")]
[SentenceParam("comparison?", AutomationDescriptorType.Wait|AutomationDescriptorType.Verification|AutomationDescriptorType.Extraction, StaticValueListMethod = "PopulateComparisonList", DisableTextBoxEdit = true)]
public virtual string Comparison { get; set; }

Property Value

string

FriendlyDescription

Get a friendly description of this descriptor to show in the scenario explorer.

Declaration

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

Property Value

string

Overrides AutomationDescriptor.FriendlyDescription

Value

Declaration

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

Property Value

object

Methods

ExtractData(IApplication, DescriptorValueStore)

Declaration

cs-api-definition
public override void ExtractData(IApplication hostApp, DescriptorValueStore dataStore)

Parameters

hostApp

IApplication

dataStore

DescriptorValueStore

Overrides XamlVerificationDescriptor.ExtractData(IApplication, 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)

GetCompareType(string)

Declaration

cs-api-definition
protected virtual XamlStringCompareType GetCompareType(string strValue)

Parameters

strValue

string

Returns

XamlStringCompareType

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 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)

PopulateComparisonList(SentenceParam)

Declaration

cs-api-definition
public virtual object PopulateComparisonList(SentenceParam sentenceParam)

Parameters

sentenceParam

SentenceParam

Returns

object

ToCode()

This method is called when the user requests code generation. The framework initializes the TestMethod property of this object with a new instance that this method simply needs to add its custom codegen to it.

Declaration

cs-api-definition
public override void ToCode()

Overrides AutomationDescriptor.ToCode()

ValueCompare(DescriptorValueStore, object)

Declaration

cs-api-definition
public virtual bool ValueCompare(DescriptorValueStore dataStore, object value)

Parameters

dataStore

DescriptorValueStore

value

object

Returns

bool

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)