| || |
Logic for Multiple Events
OK, after reading the help for CreateTEventGroup and TeventGroup, I am still in the dark as to how to code for multiple events. In QARun, I would use a statement such as:
Wait(“30”, “any”, “ScreenEvent1”, “ScreenEvent2”)
If Event = “ScreenEvent1”
// do appropriate actions to respond to ScreenEvent1
If Event = “ScreenEvent2”
// do appropriate actions to respond to ScreenEvent2
I want to avoid the situation where I have multiple WAIT statements, since it doesn’t make sense to Wait for ScreenEvent1 if ScreenEvent2 = True and the 2 events are mutually exclusive.
I am trying to code the equivalent in TestPartner, using limited academic programming experience and limited knowledge of VBA. I need your help. I think I need to do the following via pseudocode but can’t deduce the VBA equivalents:
- establish the group
- let TestPartner know the 2 screen events belong to the group
- add logic as to what to do in response to the occurrence of Event1
- add logic as to what to do in response to the occurrence of Event2
The examples in the Help reference Key events, which aren’t terribly helpful to me. I’m having trouble making the leap from a Key event to a pre-defined Screen event. So if someone could provide an example that uses a screen event, it would be less abstract for me.
I am in the ballpark?
Re: Logic for Multiple Events
look at the whenever event help. If I remember right you must do conditioal logic to find out which event called the function. Something like Event.Name I think.