VS2010 で CUIT を使用していくつかのテスト ケースを記録しました。前日はすべて正常に機能しました。そのため、今日もう一度実行すると、すべてのテストが失敗し、次の警告が表示されました: The following element is no longer available ... and I got the exception : Can't perform "Click" on the hidden control, which is not true because allコントロールは非表示になりません。他のマシンで試してみましたが、同様に失敗しました。
なぜそれが起こるのか誰か知っていますか?他の何かのための Web アプリケーションのためですか? 助けてください、ありがとう。
PS: それで、「隠されたコントロール」と言ったのと同じコントロールで新しいテストを記録しようとしましたが、新しいテストはうまくいきました!? 理由がわかりません。
編集
記録中に要素またはコントロールをキャプチャしようとすると、「The following element blah blah ...」という警告が表示されます。ボタンのソースコードは「非表示」と言われています
public HtmlImage UIAbmeldenImage
{
get
{
if ((this.mUIAbmeldenImage == null))
{
this.mUIAbmeldenImage = new HtmlImage(this);
#region Search Criteria
this.mUIAbmeldenImage.SearchProperties[HtmlImage.PropertyNames.Id] = null;
this.mUIAbmeldenImage.SearchProperties[HtmlImage.PropertyNames.Name] = null;
this.mUIAbmeldenImage.SearchProperties[HtmlImage.PropertyNames.Alt] = "abmelden";
this.mUIAbmeldenImage.FilterProperties[HtmlImage.PropertyNames.AbsolutePath] = "/webakte-vnext/content/apps/Ordner/images/logOut.png";
this.mUIAbmeldenImage.FilterProperties[HtmlImage.PropertyNames.Src] = "http://localhost/webakte-vnext/content/apps/Ordner/images/logOut.png";
this.mUIAbmeldenImage.FilterProperties[HtmlImage.PropertyNames.LinkAbsolutePath] = "/webakte-vnext/e.consult.9999/webakte/logout/index";
this.mUIAbmeldenImage.FilterProperties[HtmlImage.PropertyNames.Href] = "http://localhost/webakte-vnext/e.consult.9999/webakte/logout/index";
this.mUIAbmeldenImage.FilterProperties[HtmlImage.PropertyNames.Class] = null;
this.mUIAbmeldenImage.FilterProperties[HtmlImage.PropertyNames.ControlDefinition] = "alt=\"abmelden\" src=\"http://localhost/web";
this.mUIAbmeldenImage.FilterProperties[HtmlImage.PropertyNames.TagInstance] = "1";
this.mUIAbmeldenImage.WindowTitles.Add("Akte - Test Akte Coded UI VS2010");
#endregion
}
return this.mUIAbmeldenImage;
}
}