0
我被要求評估Visual Studio進行自動化測試工作。 我已經選擇創建一個簡單的編碼UI測試,我只是想打開掃雷(Win7版本),玩自定義遊戲選項,然後關閉應用程序。編碼UI測試:測試運行不會打開簡單的菜單
每次我運行測試,它都不會打開'遊戲'菜單項。現在
// Click 'Game' -> 'Options F5' menu item
Mouse.Click(uIOptionsF5MenuItem, new Point(26, 6));
,如果我自己單擊菜單項(基本上給測試「推」),自動選擇我需要的菜單選項接管,然後將沒有任何問題運行。我只是無法弄清楚爲什麼測試不能自己打開這個菜單。我已經嘗試了SetFocus方法,並且我還沒有找到任何其他選項。 MSDN文檔提供了ZERO幫助。
任何人都有一個想法,我可以如何讓這個菜單打開?
Result Message:
Test method Blorg.CodedUITest1.CodedUITestMethod1 threw exception: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
TechnologyName: 'MSAA'
ControlType: 'MenuItem'
Name: 'Options F5'
從Windows開始菜單中啓動程序並沒有爲我工作。我想我通過創建桌面快捷方式來管理它,然後雙擊桌面圖標。 – AdrianHHH
您使用哪些搜索屬性? – barakcaf