This is a migrated thread and some comments may be shown as answers.

Is XamlFindExpression applicable to WPF Desktop applications?

1 Answer 23 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Georgi asked on 04 Aug 2014, 11:57 AM
Is this location method applicable for WPF Desktop applications?

I am asking this question because it is defined under namespace 'ArtOfTest.WebAii.Silverlight', and it does not seems to work.

Here is my test.

Consider this call:


It returns:

‚Äč<tradebutton Name="PART_BuyButton" Uid="10313144">
  <button Uid="38447936">
    <grid Name="grid" Uid="25709437">
      <border Name="Regular" Uid="30058349" />
      <border Name="OverlayRegular" Uid="2089687" />
      <border Name="OverlayHover" Uid="18807190" />
      <border Name="Pressed" Uid="35046986" />
      <border Name="Disabled" Uid="46987420" />
      <border Name="ContentHolder" Uid="20233597">
        <contentpresenter Uid="47884646">
          <textblock Uid="28308632">Buy</textblock>

While the next one returns null:

Console.WriteLine(profit.Find.ByExpression(new XamlFindExpression("TagName=tradebutton")));

Is this:

  - a bug
  - unsupported feature
  - error on my side?

1 Answer, 1 is accepted

Sort by
Boyan Boev
Telerik team
answered on 07 Aug 2014, 10:28 AM
Hi Georgi,

Thank you for contacting us.

You should make a slight change in your code. There is no TagName in WPF. Please change TagName with XamlTag:

Console.WriteLine(profit.Find.ByExpression(new XamlFindExpression("XamlTag=tradebutton")));

Hope this helps.

Boyan Boev
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
General Discussions
Asked by
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question