Question

I am automating a windows 8.1 store app using Coded UI test. I have a Imagebrush control where user image will be loaded on service call. The thing is I cannot identify this control using Coded UI Cross hair/Inspect.exe eventhough it have automation id supplied. But the Image control can be identified.

The below XAML have two border elements and within the 1st border element I am having Imagebrush control and in the next border element I am having image control. Here I can identify the Image control but the Imagebrush control cannot be identified. I tried hand coding also but it did not work.

<Border AutomationProperties.AutomationId="123" Tapped="MyProfile_Tapped">
  <Border.Background>
   <ImageBrush AutomationProperties.AutomationId="123_4" ImageSource="{Binding Profile.ProfilePhot....... />
  </Border.Background>
</Border>

<Border AutomationProperties.AutomationId="1234_5">
  <Image AutomationProperties.AutomationId="1234_6" Source="ms-appx:///Assets/Images/WatchAlbumLogo.png" />
</Border>

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top