How to use snoop WPF for UI Automation - wpf

I am trying to automate an app using AutomationElement or TestWhite/FlaUI, the problem is snoopWPF seems the only one that is able to see the elements inside the window due to its injection feature (spy++ or inspect.exe do not see the visualtree).
Is it possible to use snoop code to automate a button click on a windows? any examples? thanks

Related

VS 2012 Coded UI Testing and WPF User Control

I have an application that uses a UserControl inside of a Window, Coded UI Testing recognizes everything in the Window (buttons, etc.) but inside the UserControl I just get a blue box around the area and cannot select anything inside for recording.
I've been all over google for this issue and I think it has to do with the AutomationPeers (?). Any suggestions would be useful in how to get these elements visible to Coded UI
If the custom control doesn't provide a customized/override version of the OnCreateAutomationPeer, you can't. You need to ask developers to implement automation support for their control.
UPDATE:
My issue was that Coded UI couldn't see past my TabControl (displays different user controls). I followed this solution to create a CustomTabControl and override the OnCreationAutomationPeer() method so that the lower elements could be displayed.
[ click here ]

Creating a walk through in WPF

I'm trying to add a "walk-through" mode to my existing WPF project which will guide the user through the process of using my application. Trying to look this up is difficult, because every Google search for "WPF walk through" returns a walk-through on how to use WPF!
I've thought of something like using tooltips and programmatically controlling when they are visible for each control in the GUI ("Press this button next, etc") but I'm hoping for suggestions on a better way as I'm still pretty new to WPF.
Thanks,
Mike
I would use Popup.
Just show same popup with different content near to interested controls
What you appear to be looking for is a wizard... check this one out:
Extended WPF Toolkit™ Community Edition

Silverlight UI Automation of a Child Window and its controls?

I have trouble to make UI Automation of the Child Windows. I cannot trace any element inside any child window in the project. I am using UISpy. I set AutomationProperties.AutomationId for all of items inside ChildWindows.
I am hoping to find the answer on thos topic. There is no much documentation on it or I was not able to find it. Any sample or ideas are highly appreciated!
There isn't good automation support for Popups in Silverlight at this time. Popups are not considered part of the main visual tree, so they are effectively disconnected. ChildWindows are shown in a Popup, so they are effectively disconnected as well.
Here is one possible solution, which basically tracks the popups/child windows and injects them as automation children of the parent page.
Apparently, Telerik also has a solution for their test suite, with a video here.

xaml debugging application

I need to debug xaml and i am looking for some application for that .
Need for recommendations.
Snoop not manages to find my application while i am trying use it.
Thanks
I've had great results with Snoop but you might want to check if you are running your app with elevated permissions eg as administrator as this will prevent it showing up in the list of applications inside Snoop - from snoop codeplex page
Why Aren’t My Apps Showing Up in the App Chooser? One question that comes
up all the time is the situation where
the application you are trying to
Snoop, isn't appearing in the
application chooser (i.e. the combo
box that lists the processes you can
Snoop). This is more than likely a
situation where the application you
are trying to Snoop is running
elevated (as Administrator). In order
to Snoop these applications, you will
also need to run Snoop elevated (as
Administrator).
Also if your xaml is Silverlight then it looks like the only options is Silverlight Spy
You can use 'Visual Tree Visualizer' from VS 10 (VS C#/VB.NET) 2010 Express. See: http://msdn.microsoft.com/en-us/library/dd409789.aspx

block script debugging for wpf browser control

I have used browser control for my WPF browser application.I want to disable the script error message.Please let me know exactly as I am very new to this application.
Thanks in advance.
Answer other than disabling script message on advance tab of internet option.
The problem here is that the WPF WebBrowser did not implement this property as in the 2.0 control.
Your best bet is to use a WindowsFormsHost in your WPF application and use the 2.0's WebBrowser property: SuppressScriptErrors. Even then, you will need the application to be full trust in order to do this.
Not what one would call ideal, but it's pretty much the only option currently.

Resources