xavier_007 发表于 2010-4-2 09:24:50

【急】qtp录制mfc控件问题

我用qtp录制mfc程序,toolbar,菜单栏,标签页控件都是无法识别的。
请高手告诉我为什么,多谢:handshake

yujie6832 发表于 2010-4-2 09:50:08

说明该控件无法识别,用虚拟对象或者对象映射试试

yujie6832 发表于 2010-4-2 09:50:45

或者用WSH,利用快捷键

xavier_007 发表于 2010-4-2 10:17:53

回复 3# 的帖子

楼上能否说详细点?
例如我录制2级菜单项:显示-》查看
怎么录制

xavier_007 发表于 2010-4-2 10:18:55

虚拟对象要虚拟多个,个人感觉不适用

shotstar 发表于 2010-4-2 12:17:02

我记得Window标准控件都应该可以识别到的。你可以点击spy,然后按住ctrl去点菜单,等菜单出来再松开ctrl,用鼠标点击菜单去识别对象。
有可能是你们开发同事不是用标准的控件,都是自己写的控件?于是QTP识别不了?

yujie6832 发表于 2010-4-2 12:30:35

WSCRIPT.SHELL
具体用法可以查询下百度,前提要有支持快捷键哦

k4124k 发表于 2010-4-2 13:29:23

原帖由 yujie6832 于 2010-4-2 12:30 发表 http://bbs.51testing.com/images/common/back.gif
WSCRIPT.SHELL
具体用法可以查询下百度,前提要有支持快捷键哦


补充说明:例如一般IE的"文件"菜单的快捷键是"Alt+F",那你可以用WSCRIPT.SHELL来操作键盘。然后"文件"这个菜单就显示出来啦~~

xavier_007 发表于 2010-4-2 14:23:12

回复 6# 的帖子

谢谢解答,是标控
你的方法识别的仍然是WinObject

xavier_007 发表于 2010-4-2 14:25:00

好的,快捷键可以自己加
可否加我的msn:magic_xavier@hotmail.com
方便请教

TIB 发表于 2010-4-14 11:54:11

WInObject也支持Type方法,也可以发送键盘按键

例:
Dialog("XXX").WinObject("XXX").Type micReturn

附 - 按键常量:
micCtrlDwnPresses the Ctrl key.
micCtrlUpReleases the Ctrl key.
micLCtrlDwnPresses the left Ctrl key.
micLCtrlUpReleases the left Ctrl key.
micRCtrlDwnPresses the right Ctrl key.
micRCtrlUpReleases the right Ctrl key.
micAltDwnPresses the Alt key.
micAltUpReleases the Alt key.
micLAltDwnPresses the left Alt key.
micLAltUpReleases the left Alt key.
micRAltDwnPresses the right Alt key.
micRAltUpReleases the right Alt key.
micShiftDwnPresses the Shift key.
micShiftUpReleases the Shift key.
micLShiftDwnPresses the left Shift key.
micLShiftUpReleases the left Shift key.
micRShiftDwnPresses the right Shift key.
micRShiftUpReleases the right Shift key.
micInsPresses the Insert key.
micDelPresses the Delete key.
micHomePresses the Home key.
micEndPresses the End key.
micPgUpPresses the Page Up key.
micPgDwnPresses the Page Down key.
micUpPresses the Up arrow key.
micDwnPresses the Down arrow key.
micLeftPresses the Left arrow key.
micRightPresses the Right arrow key.
micEscPresses the Esc key.
micBackPresses the Backspace key.
micReturnPresses the Return key.
micTabPresses the Tab key.
micBreakPresses the Break key.
micPausePresses the Pause key.
micPrintScrPresses the Print Screen key.
micWinLogoDwnPresses the Windows Logo key.
micWinLogoUpReleases the Windows Logo key.
micLWinLogoDwnPresses the left Windows Logo key.
micLWinLogoUpReleases the left Windows Logo key.
micRWinLogoDwnPresses the right Windows Logo key.
micRWinLogoUpReleases the right Windows Logo key.
micAppKeyPresses the Application key.
micF1Presses the F1 key.
micF2Presses the F2 key.
micF3Presses the F3 key.
micF4Presses the F4 key.
micF5Presses the F5 key.
micF6Presses the F6 key.
micF7Presses the F7 key.
micF8Presses the F8 key.
micF9Presses the F9 key.
micF10Presses the F10 key.
micF11Presses the F11 key.
micF12Presses the F12 key.
micNumLockOnTurns on the Num Lock.
micCapsLockOnTurns on the Caps Lock.
micScrollOnTurns on the Scroll Lock.
micNumLockOffTurns off the Num Lock.
micCapsLockOffTurns off the Caps Lock.
micScrollOffTurns off the Scroll Lock.

slm601 发表于 2011-2-23 14:51:01

回复 10# xavier_007


    我也遇到了这样的问题,你的这个问题有没有解决啊?怎么解决的??
页: [1]
查看完整版本: 【急】qtp录制mfc控件问题