I want to make wp7 app GUI testing tool!!!
wp7 emulator running on the app I want to get the UIElement.
Did you get access to the runtime UIElement?
wp7 emulator Run-time access to samples or Tip and Open source let me know.
I want to make wp7 app GUI testing tool!!!
wp7 emulator running on the app I want to get the UIElement.
Did you get access to the runtime UIElement?
wp7 emulator Run-time access to samples or Tip and Open source let me know.
I don't know of any dedicated tool for WP7. You can use Linq-to-VisualTree to inspect the visual tree at runtime. As a debug visualisation aid, the following Linq query will output teh visual tree:
string tree = this.DescendantsAndSelf().Aggregate("",
(bc, n) => bc + n.Ancestors().Aggregate("", (ac, m) => (m.ElementsAfterSelf().Any() ? "| " : " ") + ac,
ac => ac + (n.ElementsAfterSelf().Any() ? "+-" : "\\-")) + n.GetType().Name + "\n");
Producing for example:
\-MainPage
\-Grid
+-TextBox
| \-Grid
| +-Border
| | \-Grid
| | +-Border
| | \-Border
| | \-ScrollViewer
| | \-Border
| | \-Grid
| | +-ScrollContentPresenter
| | | \-TextBoxView
| | +-Rectangle
| | +-ScrollBar
| | \-ScrollBar
| +-Border
| +-Border
| \-Border
| \-Grid
| +-Path
| \-Path
\-StackPanel
+-TextBox
| \-Grid
| +-Border
| | \-Grid
| | +-Border
| | \-Border
| | \-ScrollViewer
| | \-Border
| | \-Grid
| | +-ScrollContentPresenter
| | | \-TextBoxView
| | +-Rectangle
| | +-ScrollBar
| | \-ScrollBar
| +-Border
| +-Border
| \-Border
| \-Grid
| +-Path
| \-Path
\-Grid
+-TextBox
| \-Grid
| +-Border
| | \-Grid
| | +-Border
| | \-Border
| | \-ScrollViewer
| | \-Border
| | \-Grid
| | +-ScrollContentPresenter
| | | \-TextBoxView
| | +-Rectangle
| | +-ScrollBar
| | \-ScrollBar
| +-Border
| +-Border
| \-Border
| \-Grid
| +-Path
| \-Path
\-StackPanel
\-TextBox
\-Grid
+-Border
| \-Grid
| +-Border
| \-Border
| \-ScrollViewer
| \-Border
| \-Grid
| +-ScrollContentPresenter
| | \-TextBoxView
| +-Rectangle
| +-ScrollBar
| \-ScrollBar
+-Border
+-Border
\-Border
\-Grid
+-Path
\-Path
You might be able to use this to create your own tool.