1
不知道是否有人可以幫忙。我試圖自動化一些銀色燈光網站的導航測試。我的一個測試點擊一個按鈕,該按鈕依次打開一個帶有許多其他控件的radWindow彈出窗口。問題是我無法獲取新打開的radWinow上的任何對象的細節。如果我嘗試將所有控件都設置爲列表,我的代碼將返回Silverlight網頁的對象。新打開的radWindow彈出窗口沒有url,所以我無法激活/移動焦點。任何人都可以在這個問題上解決任何問題嗎?C#Aulling測試 - Webaii Silver Light網站radWindow沒有焦點
下面是我的代碼的副本,如果這有助於: -
//List of buttons on orignal Silver Light Web page
var buttons = _silverlightApp.Find.AllByType<TextBlock>();
System.Drawing.Point point = new System.Drawing.Point();
point.X = 350;
point.Y = 280;
//Open radWindow popup
buttons[1].User.ClickPoint(point);
//Wait for radWindow popup to open
Thread.Sleep(10000);
//Try to get a list of all the objects on the new radWindow
var buttons1 = _silverlightApp.Find.AllByType<TextBlock>();
嗨。謝謝您的回答。對不起,我花了很長時間纔回到你身邊。我一直在度假。好吧,我嘗試了上面的代碼,但得到了以下異常: - 「ArtOfTest.Common.Exceptions.FindElementException'類型的異常發生在ArtOfTest.WebAii.dll中,但未在用戶代碼中處理 附加信息:Element not found! FindExpression used: [xamltag'Exact'RadWindow]「 – ED209 2014-11-04 15:10:57
該異常意味着它無法找到RadWindow彈出窗口。你是否100%確定你正在使用RadWindow?獲取VisualTree的副本(請觀看此視頻:http://www.screencast.com/t/m7NEmJMdO)將幫助我們明確您正在處理的內容。但是如果你沒有安裝Test Studio,這可能幾乎是不可能的。 – sircody 2014-11-07 17:44:05