IMPORTANT NOTICE: As of 21 February, anything posted in this community WILL NOT BE MIGRATED to our new community site. We have pulled all user information and data from this site and are now in an approximately week long process of importing users, roles, and data to our new site. We are leaving this site open and active so you can post and hopefully get a response until the migration is complete. Once complete, the URL that currently takes you to this site will take you to our new site so your bookmarks will work as always. Please read the information on a New Login Process
There exists a textfield object in my application. This object is populated at runtime with a dynamic value and we would like to verify this value but ignoring the dynamic part of the value.For example, to verify whether a string "XXXX 123123 XXXXX" will appear in a control, the number part of the string is dyanmic. How can we perform a verification against this value in a Visual Test?
This type of comparison requires the use of wildcards. We recommend using a .NET script to perform the comparison, then pass the result of the comparison to the Visual Test. This Knowledge Base article, #33922, details steps on capturing values from a .NET script and passing the value to a Visual Test.VB.NET allows you to perform wildcard comparisons using the Like operatorDim s As Strings = "XXXX 123123 XXXXX"If s Like "XXXX * XXXXX" Then...Else...End IfThe wildcards you can use in this scenario are:* - denotes any number of characters? - denotes a single character