用C#实现QTP的启动和Add-Ins的加载。
// Launch QTP QuickTest.Application qtpApp = new QuickTest.Application(); string[] arrAddins = dpString.dpSplit(FrameHelper.GetGlobalSetting()["Addins"], ","); object AddinNames = arrAddins; object ErrorDescrition = ""; if (qtpApp.SetActiveAddins(ref AddinNames, out ErrorDescrition)) { FrameHelper.WriteLogToFile(DateTime.Now.ToString("HH:mm:ss") + " Message: Load Add-ins successfully."); } else { FrameHelper.WriteLogToFile(DateTime.Now.ToString("HH:mm:ss") + " Error: Meet an error when loading Add-ins: " + ErrorDescrition); } qtpApp.Launch();