0
UIMap.cs(UIMap.Designer.csではなく)に手書きのコード化コントロールを追加したいと思います。例えばコード化されたコントロールをUIMap(コード化UIテスト)に追加
、ときに私の記録:writing in a texBox
、私はUIMap.Designer.csに次のコードを取得する:
public class Recorded_Writing_In_forRecordParams
{
public string UIForRecordEditText = "forRecord";
}
public class UIMainWindowWindow : WpfWindow
{
public UIMainWindowWindow()
{
this.SearchProperties[WpfWindow.PropertyNames.Name] = "MainWindow";
this.SearchProperties.Add(new PropertyExpression(WpfWindow.PropertyNames.ClassName, "HwndWrapper", PropertyExpressionOperator.Contains));
this.WindowTitles.Add("MainWindow");
}
public WpfEdit UIForRecordEdit
{
get
{
if ((this.mUIForRecordEdit == null))
{
this.mUIForRecordEdit = new WpfEdit(this);
this.mUIForRecordEdit.SearchProperties[WpfEdit.PropertyNames.AutomationId] = "forRecord";
this.mUIForRecordEdit.WindowTitles.Add("MainWindow");
}
return this.mUIForRecordEdit;
}
}
private WpfEdit mUIForRecordEdit;
}
は、私は私のCodedUITest
でこのコントロールを使用します。 UIMap.cs
のTextBox
をコードで検索したり、TestMethod
で検索する方法はありますか?どちらが最善の方法ですか?
あなたがしたいことを理解しているかわかりません。なぜコード内のテキストボックスのUIMapを検索するのですか?または、アプリケーションで特定の値のテキストボックスを検索したいですか? – stoj