devepxress qtp 点击子菜单

  Dim L,T,R,B
' click 父亲菜单
SwfWindow( " Form1 ").SwfObject( " SwfObject ").Click  55, 15
' 调用swfobject的方法,得到坐标
SwfWindow( " SwfWindow ").SwfObject( " SwfObject ").GetTextLocation   " Eric Test ", L,T,R,B, True
' click 父亲菜单2次
SwfWindow( " Form1 ").SwfObject( " SwfObject ").Click  54, 18
SwfWindow( " Form1 ").SwfObject( " SwfObject ").Click  54, 18
' click 找到的坐标
SwfWindow( " SwfWindow ").SwfObject( " SwfObject ").Click (L+R)/ 2, (T+B)/ 2
SwfWindow( " Form1 ").Dialog( " #32770 ").WinButton( " 确定 ").Click

你可能感兴趣的:(qtp)