[VID] GUI Automation listener - performing repetitive actions automatically while the test is executing #395
Replies: 6 comments
-
In the example you show message boxes which exact format is known before. We have an application which can raise few kinds of message boxes - not always in known format (e.g. different kinds of exceptions). How can this be handled? Thanks. undefined (Quali) - 08/14/2014 11:25 AM
|
Beta Was this translation helpful? Give feedback.
-
In the example you show message boxes which exact format is known before. We have an application which can raise few kinds of message boxes - not always in known format (e.g. different kinds of exceptions). How can this be handled? Thanks. undefined (Quali) - 08/14/2014 11:25 AM
|
Beta Was this translation helpful? Give feedback.
-
Hi Olga, Depending if the application will raise a small set of different message boxes (for example, of 3 different types) you can expand the solution above that Test 25 (the GUI Automation) will contain three "Mouse" steps, and not just one. Each Mouse step is designated to handle a popup of one type.
undefined (tal.a) - 08/14/2014 12:44 PM
|
Beta Was this translation helpful? Give feedback.
-
Hi Olga, Depending if the application will raise a small set of different message boxes (for example, of 3 different types) you can expand the solution above that Test 25 (the GUI Automation) will contain three "Mouse" steps, and not just one. Each Mouse step is designated to handle a popup of one type.
undefined (tal.a) - 08/14/2014 12:44 PM
|
Beta Was this translation helpful? Give feedback.
-
Hi Tal, I found a way to identify exceptions, for example all exceptions message boxes will have the following parameter: /form[@processname='InuSpector' and @controltypename='ThreadExceptionDialog']. I run the loop as you suggested (in parallel to the test). Inside I use the "verify" method of GUIautomation to check if this controll exists. The problem is that it slows down all the test very drastically. If I run only the part which verifies, I notice it takes few seconds. I guess that is why it slows down each step on the test. But as far as I understand these two parts (the test steps and the while loop) should be parallel, meaning it may slow down a bit the whole system, but they should run in different threads and not wait one for another to be completed. As it seems now, one step from the test flow is performed, and then one loop of the while loop is performed, only AFTER the loop finishes another step from the test is performed, and so on. How can I really parallelize the two parts? Thanks. undefined (Quali) - 08/17/2014 02:59 AM
|
Beta Was this translation helpful? Give feedback.
-
Hi Tal, I found a way to identify exceptions, for example all exceptions message boxes will have the following parameter: /form[@processname='InuSpector' and @controltypename='ThreadExceptionDialog']. I run the loop as you suggested (in parallel to the test). Inside I use the "verify" method of GUIautomation to check if this controll exists. The problem is that it slows down all the test very drastically. If I run only the part which verifies, I notice it takes few seconds. I guess that is why it slows down each step on the test. But as far as I understand these two parts (the test steps and the while loop) should be parallel, meaning it may slow down a bit the whole system, but they should run in different threads and not wait one for another to be completed. As it seems now, one step from the test flow is performed, and then one loop of the while loop is performed, only AFTER the loop finishes another step from the test is performed, and so on. How can I really parallelize the two parts? Thanks. undefined (Quali) - 08/17/2014 02:59 AM
|
Beta Was this translation helpful? Give feedback.
-
We had a recent use case, where one of our customers asked us how to define GUI Automator action for the following scenario:
During the test, in an irregular manner, a dialog box will pop up and appear in the screen.
The GUI Automator will then need to take action immediately and click on the "OK" button to continue the flow of the test.
The solution can be shown nicely in this video:
https://qualisystemscom.viewscreencasts.com/embed/a34a755f3ba3421285b51b7d04db4e70
Put both attached test files on the Tests root folder.
Test24 is the main test that is doing something (the delay step is indication that the test is running).
In parallel, it will call Test25 in a never-ending loop - this will serve as our listener.
Test25 has a GUI Automation step that all it does is to simply click on an OK button.
If the OK button does not appear - nothing will happen and the step will time out.
To test it, I have set up Test.html (attached) that pops up alerts on an irregular manner, using Javascript.
In my case, the GUI Automator will launch the browser on its first run.
As the session is set up to continue an existing session, and I have no End Session step on the GUI Automation min-canvas, it is always keep on the same session.
Attachments:
(tal.a) - 02/06/2014 04:36 PM
· 2670 ·
Beta Was this translation helpful? Give feedback.
All reactions