Problem getting ComboBox from Windows File Save dialog

Jul 6, 2010 at 10:25 AM

Hi

I have problems to get file type combobox from SaveFileDialog

the edit field with automation ID 1001 is no problem and the save button is also found

(namespace Microsoft.win32.SaveFileDialog class)

System Windows7 x64 (Windows XP uses an other dialog at this point)

 

If I try to get the combobox 

 

 

ComboBox _fileTyp = _window.Get<ComboBox>(SearchCriteria.ByAutomationId("FileTypeControlHost"));

 

 


the following error appears.

 

 ----> White.Core.Mappings.ControlDictionaryException : Could not find TestControl for ControlType=combo box and FrameworkId:DirectUI
at White.Core.UIItems.UIItemContainer.Get(SearchCriteria searchCriteria) in d:\white\Core\UIItems\UIItemContainer.cs: line 95
at White.Core.UIItems.UIItemContainer.Get(SearchCriteria searchCriteria) in d:\white\Core\UIItems\UIItemContainer.cs: line 76
at ETS4TestHelper.Helper.FileOpenSaveHelper..ctor(FileOpenSaveType saveTypeBoolean save) in FileOpenSaveHelper.cs: line 93
at ETS4SystemTest.Workplace.OPCExport.Class1.VerifyAllElementsForExportExists() in OPCExportTests.cs: line 53
--ControlDictionaryException
at White.Core.Mappings.ControlDictionary.GetTestControlType(ControlType controlTypeString frameWorkIdBoolean isNativeControl) in d:\white\Core\Mappings\ControlDictionary.cs: line 146
at White.Core.Mappings.ControlDictionary.GetTestType(String classNameControlType controlTypeString frameworkIdString nameBoolean isNativeControl) in d:\white\Core\Mappings\ControlDictionary.cs: line 213
at White.Core.Mappings.ControlDictionary.GetTestType(AutomationElement automationElement) in d:\white\Core\Mappings\ControlDictionary.cs: line 205
at White.Core.Factory.DictionaryMappedItemFactory.Create(AutomationElement automationElementActionListener actionListener) in d:\white\Core\Factory\DictionaryMappedItemFactory.cs: line 15
at White.Core.Factory.DictionaryMappedItemFactory.Create(AutomationElement automationElementActionListener actionListenerType customItemType) in d:\white\Core\Factory\DictionaryMappedItemFactory.cs: line 22
at White.Core.Factory.PrimaryUIItemFactory.Create(SearchCriteria searchCriteriaActionListener actionListener) in d:\white\Core\Factory\PrimaryUIItemFactory.cs: line 76
at White.Core.UIItems.Container.NonCachedContainerItemFactory.Find(SearchCriteria searchCriteria) in d:\white\Core\UIItems\Container\NonCachedContainerItemFactory.cs: line 25
at White.Core.UIItems.Container.ContainerItemFactory.Get(SearchCriteria searchCriteriaActionListener uiItemActionListener) in d:\white\Core\UIItems\Container\ContainerItemFactory.cs: line 13
at White.Core.Sessions.NullWindowSession.Get(ContainerItemFactory containerItemFactorySearchCriteria searchCriteriaActionListener actionListener) in d:\white\Core\Sessions\NullWindowSession.cs: line 19
at White.Core.UIItems.Container.CurrentContainerItemFactory.Find(SearchCriteria searchCriteriaWindowSession windowSession) in d:\white\Core\UIItems\Container\CurrentContainerItemFactory.cs: line 41
at White.Core.UIItems.UIItemContainer.Get(SearchCriteria searchCriteria) in d:\white\Core\UIItems\UIItemContainer.cs: line 88
Coordinator
Jul 18, 2010 at 9:26 AM

I think your problem is because of frameworkid which is something I have seen for the first time. Use UIAutomation directly to get to it.

Coordinator
Jul 18, 2010 at 9:26 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.