Would it be possible to have some type of Dummy Windows that could be used during testing? I want to emulate the missing Windows. These would be replaced with the real Window Names in the final code. How many are needed? I have no idea, but I would think at least 5. Obviously, no limit would be ideal, so number them.
I think they would need some type of parameter so we could designate whether it should simulate Open or Closed. An option for a delay would also allow for testing WW_TIMEOUT values.
Possible WindowName format syntax:
TestWindowx,O will perform as if it is Open
TestWindowx,C will perform as if it is Closed
TestWindowx,O,3 will wait 3 seconds, then perform as if just Opened
Test WindowxC,5 will wait 5 seconds, then perform as if it just Closed
OR, even easier, with a predetermined default delay, and positives for Open, negs for Closed:
TestWindowx,+3 will wait 3 seconds, then perform as if just Opened
Test WindowxC,-3 will wait 3 seconds, then perform as if it just Closed
We could change the delay to simulate a race condition, or make it 0 to simulate a failure.
=========================================================
Example of final code:
Code: Select all
Run Program>QuickBooks2005.exe
Let>WW_TIMEOUT=5
WaitWindowOpen>QuickBooks 2005*
If>WW_RESULT=FALSE,Error
// Save file
Press CTRL
Send>s
Release CTRL
WaitWindowOpen>Save*
Send>%FileName%
Press ENTER
Let>WW_TIMEOUT=30
WaitWindowClosed>Save*
If>WW_RESULT=FALSE,Error
//Close Program
Press ALT
Press F4
Release ALT
WaitWindowClosed>QuickBooks 2005*
Label>Error
Code: Select all
Run Program> QuickBooks2005.exe
Let>WW_TIMEOUT=5
WaitWindowOpen>TestWindow1,+2
If>WW_RESULT=FALSE,Error
// Save file
Press CTRL
Send>s
Release CTRL
WaitWindowOpen>TestWindow2,+4
Send>%FileName%
Press ENTER
Let>WW_TIMEOUT=30
WaitWindowClosed>TestWindow2,-8
If>WW_RESULT=FALSE,Error
//Close Program
Press ALT
Press F$
Release ALT
WaitWindowClosed>TestWindow1,-2
Label>Error
Not limited to WaitWindowOpen/Closed, but for otherl commands using a Window name. I can see this with WaitWindowChanged, IfWindowOpen for example.
Don't have all the answers yet, still developing the questions.
Thanks again for listening.