に呼び出しから戻ってきた私は自分のアプリケーションを実行するテストを作成し、CodedUI.Thisを使用してフィールドにテキストを入力しようとしているが、私のコードです:コード化されたUI:HRESULT E_FAILがCOMコンポーネント
var app = ApplicationUnderTest.Launch(@"C:\app.exe");
var loginEdit = new WinEdit();
loginEdit.SearchProperties.Add(WinEdit.PropertyNames.ControlName, "textEditLogin");
loginEdit.Text = "test005";
エラー:私はこのコードを使用する場合System.NotSupportedException: SetProperty "Text" is not supported on control type: Window.
:
Keyboard.SendKeys(loginEdit, "test005");
を私が持っているエラー:Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException: (Failed to get the message for an exception of type Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException due to an exception.) ---> System.Runtime.InteropServices.COMException: HRESULT E_FAIL has been returned from a call to a COM component
これは私のWinEditのプロパティです: WinEdit
何が問題なのですか?
WinWindow、ないWinEditです。この権利を得るには、[基本チュートリアル](http://www.evoketechnologies.com/blog/windows-automation-testing-coded-ui/)を使用してください。 –
なぜコントロールがWinWindowなのか分かりません。 このコントロールのControlTypeは「編集」です。 WinWindowの場合、このコントロールにテキストを入力するにはどうしたらいいですか? –
loginEdit(WinWindow)のコントロールタイプを変更し、 "Keyboard.SendKeys(loginEdit、" test005 ");"私は同じエラーがあります。 –