WPF를 사용하여 Visual Studio for my UI 프로젝트에 대한 몇 가지 UI 테스트를 C#에서 수행하려고합니다.Visual Studio UI 테스터를 사용하려고하면 FailedToperformActionOnBlockedControlException이 발생합니다.
그래서 저는 테스트 프로젝트를 만들었고 Microsoft의 튜토리얼에서 말한 것처럼 코드화 된 UI 테스트를 만들기 시작했습니다 : http://msdn.microsoft.com/en-us/library/dd286681%28v=vs.100%29.aspx. 내가 윈도우 리본의 버튼 중 하나를 클릭
MyProjectTestsUnitaires.CodedUITest1.CodedUITestMethod1 test method threw an exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnBlockedControlException: Control is blocked by another control. Make the blocked control visible and retry.
이 추가합니다 내가 테스트를 시작할 때
는하지만, 나는 다음과 같은 예외가 있습니다. 내가이 테스트를 위해 생성 된 코드를 연구 할 때 더 정확하게, 여기에 내가 무엇을 :
WpfTabList uIRibbonTabList = this.UIProjectWindow.UIRubbanCustom.UIRibbonTabList;
WpfTabPage uIONGLET2TabPage = this.UIProjectWindow.UIRubbanCustom.UIRibbonTabList.UIONGLET2TabPage;
WinListItem uIImagesjpgListItem = this.UIOuvrirWindow.UIItemWindow.UIVuedélémentsList.UIImagesjpgListItem;
#endregion
ApplicationUnderTest MyProjectApplication = ApplicationUnderTest.Launch(this.RecordedMethod1Params.ExePath, this.RecordedMethod1Params.AlternateExePath);
// Clic 'Ribbon' liste d'onglets
Mouse.Click(uIRibbonTabList, new Point(0, 82));
// Clic 'ONGLET2' onglet
Mouse.Click(uIONGLET2TabPage, new Point(-152, 58));
// Clic 'ONGLET2' onglet
Mouse.Click(uIONGLET2TabPage, new Point(-129, 53));
// Double-clic 'images.jpg' élément de liste
Mouse.DoubleClick(uIImagesjpgListItem, new Point(25, 60));
는 반면 나는, 클릭이 두 번째 헤더 인 리본의 ONGLET2에서 수행되는이 코드 참조 화면에 표시되지 않습니다. 클릭 수는 첫 번째 헤더 인 ONGLET1에 등록되었습니다.
Windows 리본에서 UI 테스트를 어떻게 사용할 수 있습니까? 당신의 도움에 대한
감사