是否有可能在编码的 UI 测试中的 ComboBox 的 SelectedItem 上提交变量的值(声明为字符串)?
例如:
private const string SALUTATION = "Mr.";
...
CommonMap.SalutationParams.LstEntriesSelectedItemsAsString = SALUTATION;
CommonMap.Salutation();
...
由于尝试此操作,我收到错误消息:
Result Message:
Test method CodedUIClassicCommon.Common.CodedUITestsCommon.CodedUIClassicCommonNeuerBenutzerWeiblich threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException: Cannot perform 'SetProperty of SelectedItemsAsString with value "A.Frau/SgF"' on the control. Additional Details:
TechnologyName: 'MSAA'
ControlType: 'List'
---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F008
TestCleanup method CodedUIClassicCommon.Common.CodedUITestsCommon.MyTestCleanUp threw exception. Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException: Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException: Cannot perform 'Click' on the hidden control. Additional Details:
TechnologyName: 'MSAA'
Name: 'Neu Ctrl+N'
ControlType: 'MenuItem'
---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F002.
我在谷歌搜索过这样的问题,但我无法解决。
谢谢你的帮助。
埃里克