我一直在按照關於Hand-Coding a Coded UI Test的分步說明學習'編碼UI'。但是,當我輸入代碼時,Visual Studio不識別HtmlProperties
。 下面是一些代碼:.NET Framework 4.5不支持'HtmlProperties'嗎?
UITestControl qEdit = new UITestControl(browserWindow);
qEdit.TechnologyName = "Web";
qEdit.SearchProperties.Add(HtmlProperties.Edit.ControlType, ControlType.Edit.Name,
HtmlProperties.Edit.Id, "sb_form_q");
qEdit.SetProperty(HtmlProperties.Edit.Text, "MSFT");
順便說一句,我使用的Visual Studio 2012,.NET框架4.5。 希望我的問題有道理。謝謝!
---實習生在這裏!
不幸的是,它沒有奏效。運行測試時發生異常。但感謝您的幫助:)我已經找到了解決方案。 – Stackeroo
我仍然認爲這是答案,因爲它真的回答了我的問題。謝謝! :) – Stackeroo
@yonidtm您可以提供一個鏈接,指出討論棄用的位置和現在的首選樣式嗎? – AdrianHHH