I would like to embed dojo/robot tests is java application.
Java application would use java-webengine for load web pages and for embed dojo script to these pages. Java-webengine gives possibility run java script.
I understand, that DOH use system mouse and keyboards events. User of my application does not see web browser page (browser running in background by webengine).
I have a couple of questions:
1. What happen with mouse pointer during DOH test execution?
2. It is possible to run DOH tests in my application internally(in the background)?
3. What happens if user will type on the keyboard or move mouse during test execution? (For instance user may switch for other application, e.g. Microsoft Word.)
Thanks!
A few things --
Dojo tests can be run from the command-line using node.js or Rhino.
I have created a DOH test suite that is backed with a Java web server and that works well, BUT...
To clarify, not all of the DOH robots use system mouse & keyboard events, only 1 particular robot (robotx) simulates actual user input. When using robotx, the mouse & keys behave as directed by the tests. If you mouse off the browser, the tests will be aborted (an alert comes up notifying you of this). Therefore, robotx cannot be run in the background because it is actually interacting with the browser.
You may have some luck using the other robots coupled with node.js or Rhino. The key concept is that you should be looking for some "headless" browser testing scenario, which is generally what Rhino handles (I believe Node can do this as well) while avoiding use of robotx.
Basically, as long as you are not using robotx (the one that actually takes control of UI) you should be able to start the tests & minimize the browser or use a headless browser engine.