Issue with large datagrid

Oct 19, 2009 at 12:42 PM
Edited Oct 27, 2009 at 2:33 PM

Edit - I changed the title of the thread ("Problem finding components in an MDI child window") after finding the source of my problem.

Here is the original issue:

I'm having trouble accessing the components of a MDI child. I find the window but I can't seem to get a hold of the components within it. Is there something that I am missing? Can I convert the UIItemContainer to a window somehow? VB isn't my native language so it's not really helping me.  

Dim application As Application = application.Launch(path)

Dim mainWindow As UIItems.WindowItems.Window = application.GetWindow("MainWindow", InitializeOption.NoCache)
Assert.IsNotNull(mainWindow)

Dim menuChoice As MenuItems.Menu = mainWindow.MenuBar.MenuItem("MenuChoice") 
menuChoice.Click()

Dim subMenuChoice = menu.SubMenu("SubMenuChoice")
subMenuChoice.Click()

Dim jwindow As UIItems.UIItemContainer = mainWindow.MdiChild(SearchCriteria.ByControlType(ControlType.Window))
Assert.IsNotNull(jwindow)

Dim myPanel As UIItems.Panel = jwindow.Get(Of Panel)("Panel1")
Assert.IsNotNull(myPanel) 'Fails, I can't find it.

Oct 20, 2009 at 12:34 PM

I gave it a try on a less complex form with fewer components and I looked for a groupBox. In that case, I could find it.

Is there an issue with forms with many components?

Oct 27, 2009 at 2:40 PM

Thanks to a colleague I found the source of my problem.

The form contains among other things a datagrid to display search results. Since it loads search results by default and I'm in a development environment (regular users have constrains) the grid was huge. My colleague helped me set it up so that I only had a handfull of search results by default.

This made my test work as intended.

But now I'm wondering if there is a way to make White ignore some components? I'm not interested in this datagrid in this set of tests and it's slowing down my search.

 

 

Coordinator
Nov 1, 2009 at 7:30 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.