WaitWPFObject doesn't work
Hi!
There is WPF TreeView and some buttons. When I push the button "Refresh" - all elements update in TreeView. And after that TestComplete cannot see this elements:
main_folder=Aliases.iexplore.IEFrame.FrameTab.tabpage.ShellDocObjectView.DocObject_Top_Class.pageHttpOisplus64AppProjectsSmar.RootBrowserWindow.MainWindow.Canvas.OpenSaveDialog.Grid.gv.mainGrid.WPFObject("Grid", "", 1).WPFObject("GroupBox", "Tree", 1).WPFObject("Grid", "", 1).WPFObject("tvQueryTree").WPFObject("TreeViewItem", "", 1).WPFObject("editBox");
//main_folder - it's an element in TreeView
refreshf=Aliases.iexplore.IEFrame.FrameTab.tabpage.ShellDocObjectView.DocObject_Top_Class.pageHttpOisplus64AppProjectsSmar.RootBrowserWindow.MainWindow.Canvas.OpenSaveDialog.Grid.gv.mainGrid.WPFObject("Grid", "", 1).WPFObject("GroupBox", "Tree", 1).WPFObject("Grid", "", 1).WPFObject("StackPanel", "", 1).WPFObject("Button", "", 4).WPFObject("StackPanel", "", 1).WPFObject("AutoGreyableImage", "", 1); // it's the button, outside TreeView
refreshf.Click(); //click the button Refresh
if (main_folder.WaitWPFObject("EditBox","*",-1,2000).Exists)
Log.Message("Ok"); //this line never executes
main_folder.Click(); // Error! TestComplete doesn't see the object, but TestComplete can see all buttons.
But when next I write this again (just copy the line (main_folder) above):
main_folder=Aliases.iexplore.IEFrame.FrameTab.tabpage.ShellDocObjectView.DocObject_Top_Class.pageHttpOisplus64AppProjectsSmar.RootBrowserWindow.MainWindow.Canvas.OpenSaveDialog.Grid.gv.mainGrid.WPFObject("Grid", "", 1).WPFObject("GroupBox", "Tree", 1).WPFObject("Grid", "", 1).WPFObject("tvQueryTree").WPFObject("TreeViewItem", "", 1).WPFObject("editBox");
refreshf.Click();
main_folder=Aliases.iexplore.IEFrame.FrameTab.tabpage.ShellDocObjectView.DocObject_Top_Class.pageHttpOisplus64AppProjectsSmar.RootBrowserWindow.MainWindow.Canvas.OpenSaveDialog.Grid.gv.mainGrid.WPFObject("Grid", "", 1).WPFObject("GroupBox", "Tree", 1).WPFObject("Grid", "", 1).WPFObject("tvQueryTree").WPFObject("TreeViewItem", "", 1).WPFObject("editBox");
main_folder.Click(); //it works
TestComplete can see the object.
It seems to me that redefining the variable is something like Wait... function, because appeared the window that is waiting for the object (main_folder) .
How to solve this issue?
.NET 4.0, WPF, IE 8.0, Windows XP