119. [ ] "$109"
120. [+] StaticText StaticText2
121. [ ] tag "$1000"
122.[ ]
123.[+] testcase PressAndReleaseButton() appstate none
124. [ ] // get the hanle of window
125. [ ] INTEGER hdWnd = Calculator.CE.GetHandle()
126. [ ] // input 11
127. [ ] Calculator.SetActive()
128. [ ] Calculator.N1.Click()
129. [ ] Calculator.N1.Click()
130. [ ] sleep(1)
131. [ ] // Press Left key of mouse
132. [ ] PostMessage(hdWnd, WM_LBUTTONDOWN, 0, 0 )
133. [ ] sleep(4)
134. [ ] // Release Left key of mouse
135. [ ] PostMessage(hdWnd, WM_LBUTTONUP,0, 0)
136. [ ]
[ ] use "C:\TA\SilkTest\mswfun32.inc"
[ ] use "C:\TA\SilkTest\msw32.inc"
[ ] use "C:\TA\SilkTest\mswconst.inc"
[ ]
[+] window MainWin Calculator
[+] multitag "Calculator"
文章来源于领测软件测试网 https://www.ltesting.net/