QTP录制鼠标右键单击事件要通过模拟键盘操作来实现

Step 1,修改ReplayType为2,一般情况默认设置是1的。(1 – 使用浏览器事件运行鼠标操作。 2 – 使用鼠标运行鼠标操作)
Setting.WebPackage(”ReplayType”) = 2

Step 2,鼠标右键单击事件
(附:Click的事件有三种 micLeftBtn 0 鼠标左键。 micRightBtn 1 鼠标右键。 micMiddleBtn 2 鼠标中键)
Browser(”支付宝 – 网上支付 安全快速!”).Page(”支付宝 – 网上支付 安全快速!”).Link(”返回我要付款”).Click , , micRightBtn

Step 3,点击右键弹出的菜单(采用键盘事件来模拟)
Set wshShell = CreateObject(”WScript.Shell”)
wshShell.SendKeys “{DOWN}” //键盘向下的箭头
wshShell.SendKeys “{DOWN}”
wshShell.SendKeys “{ENTER}” //回车键

Step 4,修改ReplayType为1(使用浏览器事件运行鼠标操作)
Setting.WebPackage(”ReplayType”) = 1

Good to go now.

相关文章:

  • 2021-06-28
  • 2022-12-23
  • 2021-04-29
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案