Index: trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlEvent.java
===================================================================
--- trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlEvent.java	(revision 942)
+++ trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlEvent.java	(revision 1069)
@@ -38,7 +38,17 @@
 
     /**
-     * the path in the HTML DOM to the object on which the event was executed
-     */
-    private String path;
+     * the HTML element on which the event was executed
+     */
+    private HtmlPageElement target;
+
+    /**
+     * the document to which the HTML element on which the event was executed belongs
+     */
+    private HtmlDocument targetDocument;
+
+    /**
+     * the targets DOM path through the document to which it belongs
+     */
+    private String targetDOMPath;
 
     /**
@@ -69,10 +79,10 @@
     /**
      * <p>
-     * initializes the event with all relevantinfos
+     * initializes the event with all relevant infos
      * </p>
      *
      * @param clientInfos    infos about the client that caused the event
      * @param time           the time stamp of the event
-     * @param path           the path in the HTML DOM to the object on which the event was executed
+     * @param target         the HTML element on which the event was executed
      * @param eventType      the type of the event, e.g. onclick
      * @param coordinates    the coordinates of the event, usually an array with two values
@@ -86,5 +96,5 @@
     HtmlEvent(HtmlClientInfos clientInfos,
               Long            time,
-              String          path,
+              HtmlPageElement target,
               String          eventType,
               Integer[]       coordinates,
@@ -95,5 +105,7 @@
         this.clientInfos = clientInfos;
         this.time = time;
-        this.path = path;
+        this.target = target;
+        this.targetDocument = target.getDocument();
+        this.targetDOMPath = target.getDOMPath();
         this.eventType = eventType;
         this.coordinates = coordinates;
@@ -104,4 +116,46 @@
 
     /**
+     * <p>
+     * initializes the event for which the id of the target is not known yet. In this case
+     * the document and DOM path for the target are provided
+     * </p>
+     *
+     * @param clientInfos    infos about the client that caused the event
+     * @param time           the time stamp of the event
+     * @param targetDocument the document to which the HTML element belongs on which the event was
+     *                       executed
+     * @param targetDOMPath  the path through the DOM of the document of the HTML element on which
+     *                       the event was executed
+     * @param eventType      the type of the event, e.g. onclick
+     * @param coordinates    the coordinates of the event, usually an array with two values
+     *                       (x and y)
+     * @param key            if the event is a key event, the key that was pressed or released
+     * @param scrollPosition if the event is a scroll event, the resulting position of the
+     *                       scrolled element
+     * @param selectedValue  if the event is an on change event, the value to which the changed
+     *                       element is changed
+     */
+    HtmlEvent(HtmlClientInfos clientInfos,
+              Long            time,
+              HtmlDocument    targetDocument,
+              String          targetDOMPath,
+              String          eventType,
+              Integer[]       coordinates,
+              Integer         key,
+              Integer[]       scrollPosition,
+              String          selectedValue)
+    {
+        this.clientInfos = clientInfos;
+        this.time = time;
+        this.targetDocument = targetDocument;
+        this.targetDOMPath = targetDOMPath;
+        this.eventType = eventType;
+        this.coordinates = coordinates;
+        this.key = key;
+        this.scrollPosition = scrollPosition;
+        this.selectedValue = selectedValue;
+    }
+
+    /**
      * @return the clientInfos
      */
@@ -118,8 +172,22 @@
 
     /**
-     * @return the path
-     */
-    String getPath() {
-        return path;
+     * @return the target
+     */
+    HtmlPageElement getTarget() {
+        return target;
+    }
+
+    /**
+     * @return the targetDocument
+     */
+    HtmlDocument getTargetDocument() {
+        return targetDocument;
+    }
+
+    /**
+     * @return the targetDOMPath
+     */
+    String getTargetDOMPath() {
+        return targetDOMPath;
     }
 
