Jul 9, 2010 at 1:18 PM
Edited Jul 9, 2010 at 1:19 PM
I've run into a problem when trying to get items from a WPF window with a tab control.
The tab control contains a number of other controls and I'm following the advice given in this thread http://white.codeplex.com/Thread/View.aspx?ThreadId=212501.
However, regardless of the currently selected tab I only ever seem to obtain items from the first tab page. UISpy shows the items as being children of the TabItem elements however it correctly shows items for the currently selected tab. Therefore I don't
see how White could be retrieving any other item.
The code is something like this:
// items added to the list on the selected tab
// at this point the new tab with the empty list is selected, no list items are visible as the new list is empty
White.Core.UIItems.ListView list = window.Get<White.Core.UIItems.ListView>("ItemsList");
// the following assert fails as there are items in the list, despite the list being visibly empty
Assert.AreEqual(0, list.Rows.Count, "0 rows expected in list");
This one is driving me a bit crazy so hopefully some has a solution! Thanks.