51Testing软件测试论坛

标题: MouseAPI-封装了一些鼠标操作的API [打印本页]

作者: TIB    时间: 2010-7-14 11:30
标题: MouseAPI-封装了一些鼠标操作的API
MouseAPI - 封装了一些鼠标操作的API,例如获取鼠标当前所在的位置、移动鼠标到指定的位置、在指定位置点击鼠标按钮等。

采用C#编写,可在QTP中通过DotNetFactory调用,例如:

Set mouse = DotNetFactory.CreateInstance("MouseAPI.MouseAPI","D:\Automation Framworks\AutomationTestAPI\MouseAPI\MouseAPI\bin\Debug\MouseAPI.dll")
mouse.MoveMouse 0,0
x = mouse.GetMouseX()
y = mouse.GetMouseY()
Print x
Print y
Set mouse = Nothing

http://www.cnblogs.com/testware/archive/2010/07/14/1777100.html




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2