How to automate UI interaction during acceptance test run

183 views Asked by At

Scenario 1:

Given main window (a window with only 1 button "Execute")
When click "Execute"
Then main window display "Hello, World"

Scenario 2:

Given main window (a window with only 1 button "Execute")
When click "Execute" (it will call domainFunc.Execute method, and inside the method it will pop up a messageBox. DomainFunc locates in BL)
And click "Yes" button (the domainFunc.Execute will proceed to next statement)
Then main window display "Hello, World"

I know how to write an automate test for scenario 1, but have no idea for scenario 2. The difficult part of scenario 2 is that I don't know how to gain control of the messageBox to automate its clicking event and proceed the test.

Anyone has any idea?

0

There are 0 answers