|
|
|
|
|
|
|
Re: How to ensure the correct application is tested [message #756286 is a reply to message #756244] |
Fri, 11 November 2011 19:22   |
|
Hello again,
finally after some try-and-error i've found a way that works fine for me. Actually I am using the beforemetioned approach of trying to activate the application by clicking its titlebar. In case it fails an event handler is issuing an ALT+SHIFT+TAB to cycle through the windows. Since there is no test-case for ALT+SHIFT+{key} i created a little .EXE sending out such a key combination. My event handler is calling this .EXE. Alltogether it works fine... I create the .EXE using Visual Basic but should be easy with other languages as well:
Sub Main()
My.Computer.Keyboard.SendKeys("%+{TAB}", True)
REM Dim path As String = Directory.GetCurrentDirectory()
REM MsgBox(path)
End Sub
The two lines commented out can be used to get information of the current working directory. This was helpful to execute the .EXE using a relative path.
Still it's a hack and i would prefer having a test case that can handle ALT+SHIFT+{key}.
Hope this helps...
Phil
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02462 seconds