用C#实现QTP的启动和Add-Ins的加载。1
2
3
4
5
6
7
8
9
10
11
12
13
14// 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();
C# AOM QTP
欢迎您扫一扫上面的微信公众号,订阅我的博客!
分享创造价值,您的支持将鼓励我继续前行!
- Post link: http://izheyi.com/2013/06/02/C-AOM-QTP/
- Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.