[jbosstools-commits] JBoss Tools SVN: r30578 - trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Apr 14 11:50:50 EDT 2011


Author: vpakan at redhat.com
Date: 2011-04-14 11:50:49 -0400 (Thu, 14 Apr 2011)
New Revision: 30578

Added:
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java
Modified:
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandLinkTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/HtmlCommandLinkTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/IncludeTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java
   trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
Log:
Tag Tests Refactoring

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -11,6 +11,8 @@
  ******************************************************************************/
 package org.jboss.tools.vpe.ui.bot.test.editor.tags;
 
+import java.security.InvalidParameterException;
+
 import org.jboss.tools.ui.bot.ext.SWTBotExt;
 import org.jboss.tools.ui.bot.ext.Timing;
 import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
@@ -23,13 +25,12 @@
  */
 public abstract class AbstractTagTest extends VPEEditorTestCase {
   
-  protected static final String TEST_PAGE_NAME_JSP = "TagTest.jsp";
-  protected static final String TEST_PAGE_NAME_XHTML = "TagTest.xhtml";
+  private static final String TEST_PAGE_NAME_JSP = "TagTest.jsp";
+  private static final String TEST_PAGE_NAME_XHTML = "TagTest.xhtml";
   
-  protected SWTBotEditorExt jspEditor;
-  protected SWTBotEditorExt xhtmlEditor;
-  protected SWTBotWebBrowser jspWebBrowser;
-  protected SWTBotWebBrowser xhtmlWebBrowser;
+  private SWTBotEditorExt sourceEditor;
+  private SWTBotWebBrowser visualEditor;
+  private TestPageType testPageType;
   protected SWTBotExt botExt;
   
 	public AbstractTagTest() {
@@ -40,15 +41,29 @@
 	protected void setUp() throws Exception {
 	  super.setUp();
     eclipse.maximizeActiveShell();
-    createJspPage(AbstractTagTest.TEST_PAGE_NAME_JSP);
-    jspEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_JSP);
-    jspWebBrowser = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_JSP,botExt);
-    createXhtmlPage(AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    xhtmlEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    xhtmlWebBrowser = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_XHTML,botExt);
-
+    initTestPage ();
+    savePage();
 	}
-
+  /**
+   * 
+   * @param testPageType
+   * @param pageText
+   */
+	protected void initTestPage(TestPageType testPageType , String pageText){
+	  this.testPageType = testPageType;
+	  if (testPageType.equals(TestPageType.JSP)){
+	    createJspPage(AbstractTagTest.TEST_PAGE_NAME_JSP);
+	    sourceEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_JSP);
+	    visualEditor = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_JSP,botExt);
+	  } else if (testPageType.equals(TestPageType.XHTML)){
+	    createXhtmlPage(AbstractTagTest.TEST_PAGE_NAME_XHTML);
+	    sourceEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_XHTML);
+	    visualEditor = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_XHTML,botExt);
+	  } else {
+	    throw new InvalidParameterException("Invalid value of testPageType used: " + testPageType);
+	  }
+	  sourceEditor.setText(pageText);
+	}
   @Override
 	protected void closeUnuseDialogs() {
 
@@ -60,43 +75,67 @@
 	}
   @Override
   protected void tearDown() throws Exception {
-    jspEditor.close();
-    xhtmlEditor.close();
+    sourceEditor.close();
     super.tearDown();
   }
   /**
    * Runs Tag Testing
    */
   public void testTag (){
-    initPageContent ();
-    savePageContent ();
     verifyTag();
   }
   /**
-   * Initialize proper page content
+   * Initialize properly page content
    */
-  protected abstract void initPageContent ();
+  protected abstract void initTestPage ();
   /**
    * Verify tag
    */
   protected abstract void verifyTag ();
   /**
-   * Saves Page Content if it was changed and shows changed editor
+   * Saves Page if it was changed and shows changed editor
    */
-  protected void savePageContent(){
+  protected void savePage(){
     boolean wasSaved = false;
-    if (jspEditor.isDirty()){
-      jspEditor.save();
-      jspEditor.show();
+    if (sourceEditor.isDirty()){
+      sourceEditor.save();
+      sourceEditor.show();
       wasSaved = true;
     }
-    if (xhtmlEditor.isDirty()){
-      xhtmlEditor.save();
-      xhtmlEditor.show();
-      wasSaved = true;
-    }
     if (wasSaved){
       bot.sleep(Timing.time3S());
     }
   }
+  /**
+   * Returns actual Source part of VPE Editor
+   * @return
+   */
+  protected SWTBotEditorExt getSourceEditor() {
+    return sourceEditor;
+  }
+  /**
+   * Returns actual Visual part of VPE Editor
+   * @return
+   */
+  protected SWTBotWebBrowser getVisualEditor() {
+    return visualEditor;
+  }  
+  /**
+   * Returns actual Test Page File Name
+   * @return
+   */
+  protected String getTestPageFileName() {
+    String fileName = null;
+    
+    if (testPageType.equals(TestPageType.JSP)){
+      fileName = AbstractTagTest.TEST_PAGE_NAME_JSP;  
+    } else if (testPageType.equals(TestPageType.XHTML)){
+      fileName = AbstractTagTest.TEST_PAGE_NAME_XHTML;  
+    } else{
+      throw new InvalidParameterException("Invalid value of testPageType used: " + testPageType);
+    }
+    
+    return fileName;
+  }
+  
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
  */
 public class ActionParamTagTest extends AbstractTagTest{
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:a4j=\"http://richfaces.org/a4j\"\n" +
@@ -43,9 +44,9 @@
   @Override
   protected void verifyTag() {
     // check tag selection
-    xhtmlEditor.selectLine(10);
+    getSourceEditor().selectLine(10);
     bot.sleep(Timing.time3S());
-    nsIDOMNode selectedVisualNode=xhtmlWebBrowser.getSelectedDomNode();
+    nsIDOMNode selectedVisualNode=getVisualEditor().getSelectedDomNode();
     assertNotNull("Selected node in Visual Editor cannot be null",selectedVisualNode);
     String expectedSelectedNode = "DIV";
     assertTrue("Selected Node has to be '" + expectedSelectedNode + "' node but is " + selectedVisualNode.getLocalName(),

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
   private static final String SUPPORT_VALUE = "*! Support Value";
   private static final String STATUS_VALUE = "*! Status Value";
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+      "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
       "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -48,38 +49,38 @@
     // check Problems View for Errors
     assertProbelmsViewNoErrors(botExt);
     // check values which should not be displayed in Visual Editor 
-    assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+    assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
       AjaxInvisibleTagsTest.JS_FUNCTION_VALUE, 
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
       AjaxInvisibleTagsTest.QUEUE_VALUE, 
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
       AjaxInvisibleTagsTest.KEEP_ALIVE_VALUE, 
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
       AjaxInvisibleTagsTest.SUPPORT_VALUE, 
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
       AjaxInvisibleTagsTest.STATUS_VALUE, 
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
+      getTestPageFileName());
     // check empty Visual Editor
-    assertVisualEditorContainsManyNodes(jspWebBrowser,
+    assertVisualEditorContainsManyNodes(getVisualEditor(),
       "TABLE",
       1,
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContainsManyNodes(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsManyNodes(getVisualEditor(),
       "TR",
       1,
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContainsManyNodes(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsManyNodes(getVisualEditor(),
       "TD",
       1,
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContainsManyNodes(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsManyNodes(getVisualEditor(),
       "DIV",
       4,
-      AbstractTagTest.TEST_PAGE_NAME_JSP);    
+      getTestPageFileName());    
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
 public class AjaxValidatorTagTest extends AbstractTagTest{
   private static final String INPUT_TEXT = "!*- Input Text";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -45,9 +46,9 @@
   @Override
   protected void verifyTag() {
     // check tag selection
-    xhtmlEditor.selectLine(11);
+    getSourceEditor().selectLine(11);
     bot.sleep(Timing.time3S());
-    nsIDOMNode selectedVisualNode=xhtmlWebBrowser.getSelectedDomNode();
+    nsIDOMNode selectedVisualNode=getVisualEditor().getSelectedDomNode();
     assertNotNull("Selected node in Visual Editor cannot be null",selectedVisualNode);
     String expectedSelectedNode = "SPAN";
     assertTrue("Selected Node has to be '" + expectedSelectedNode + "' node but is " + selectedVisualNode.getLocalName(),

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
 public class BeanValidatorTagTest extends AbstractTagTest{
   private static final String INPUT_TEXT = "!*- Input Text";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -44,9 +45,9 @@
   @Override
   protected void verifyTag() {
     // check tag selection
-    xhtmlEditor.selectLine(10);
+    getSourceEditor().selectLine(10);
     bot.sleep(Timing.time3S());
-    nsIDOMNode selectedVisualNode=xhtmlWebBrowser.getSelectedDomNode();
+    nsIDOMNode selectedVisualNode=getVisualEditor().getSelectedDomNode();
     assertNotNull("Selected node in Visual Editor cannot be null",selectedVisualNode);
     String expectedSelectedNode = "SPAN";
     assertTrue("Selected Node has to be '" + expectedSelectedNode + "' node but is " + selectedVisualNode.getLocalName(),

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,12 +20,13 @@
  */
 public class CalendarTagTest extends AbstractTagTest{
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
-      "  xmlns:rich=\"http://richfaces.org/rich\"\n" + 
+      "  xmlns:rich=\"http://richfaces.org/rich\">\n" + 
       "  <head>\n" +
       "  </head>\n" +
       "  <body>\n" +
@@ -39,15 +40,15 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "INPUT", 
       new String[]{"class"},
       new String[]{"rich-calendar-input null"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("INPUT",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("INPUT",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:calendar>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -24,8 +24,9 @@
   private static final String CELL_1_0_VALUE = "!-* Cell 1x0 Value";
   private static final String CELL_1_1_VALUE = "!-* Cell 1x1 Value";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -55,37 +56,37 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class","rowspan"},
       new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","2"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class","colspan"},
       new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","2"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class","breakbefore"},
       new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","true"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ColumnGroupTagTest.SPAN_COLUMN_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ColumnGroupTagTest.SPAN_ROW__VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ColumnGroupTagTest.CELL_1_0_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ColumnGroupTagTest.CELL_1_1_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TBODY",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:columnGroup>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
   private static final String COLUMN_HEADER_VALUE = "!-*Column Header Value";
   private static final String COLUMN_VALUE = "!-*Column Value";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -48,36 +49,36 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-subheader rich-table-subheader"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-subheadercell rich-table-subheadercell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-firstrow rich-table-firstrow"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-cell rich-table-cell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ColumnTagTest.COLUMN_HEADER_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ColumnTagTest.COLUMN_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TD",2), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TD",2), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:column>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
   private static final String columnValue = "Column Value";
 
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:h=\"http://java.sun.com/jsf/html\"\n" +
@@ -50,32 +51,32 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        columnHeader, 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        columnValue, 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      columnHeader, 
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      columnValue, 
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-subheader rich-table-subheader"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
-        "TD", 
-        new String[]{"class"},
-        new String[]{"dr-table-subheadercell rich-table-subheadercell"},
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
-        "TR", 
-        new String[]{"class"},
-        new String[]{"dr-table-firstrow rich-table-firstrow"},
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-          "TD", 
-          new String[]{"class"},
-          new String[]{"dr-table-cell rich-table-cell"},
-          AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TD", 
+      new String[]{"class"},
+      new String[]{"dr-table-subheadercell rich-table-subheadercell"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TR", 
+      new String[]{"class"},
+      new String[]{"dr-table-firstrow rich-table-firstrow"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TD", 
+      new String[]{"class"},
+      new String[]{"dr-table-cell rich-table-cell"},
+      getTestPageFileName());
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
   private static final String defaultLabel = "DefaultLabel";
 
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+        "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
         "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
         "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
         "<html>\n" +
@@ -44,30 +45,30 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
-        "INPUT", 
-        new String[]{"type","class","value"},
-        new String[]{"text","rich-combobox-font-disabled rich-combobox-input-inactive",defaultLabel},
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContains(jspWebBrowser,
-        "INPUT", 
-        new String[]{"type","class"},
-        new String[]{"text","rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"},
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContains(jspWebBrowser,
-        "INPUT", 
-        new String[]{"type","class"},
-        new String[]{"text","rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"},
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContains(jspWebBrowser,
-        "DIV", 
-        new String[]{"class"},
-        new String[]{"rich-combobox-strut rich-combobox-font"},
-        AbstractTagTest.TEST_PAGE_NAME_JSP);    
+    assertVisualEditorContains(getVisualEditor(),
+      "INPUT", 
+      new String[]{"type","class","value"},
+      new String[]{"text","rich-combobox-font-disabled rich-combobox-input-inactive",defaultLabel},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "INPUT", 
+      new String[]{"type","class"},
+      new String[]{"text","rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "INPUT", 
+      new String[]{"type","class"},
+      new String[]{"text","rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV", 
+      new String[]{"class"},
+      new String[]{"rich-combobox-strut rich-combobox-font"},
+      getTestPageFileName());    
     // check tag selection
-    jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("INPUT"), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("INPUT"), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = jspEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     final String hasToStartWith = "<rich:comboBox";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
  */
 public class CommandButtonTagTest extends AbstractTagTest{
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+      "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
       "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -39,15 +40,15 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "INPUT", 
       new String[]{"type"},
       new String[]{"Submit"},
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
+      getTestPageFileName());
     // check tag selection
-    jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("INPUT",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("INPUT",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = jspEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<a4j:commandButton type=\"Submit\">";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandLinkTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandLinkTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandLinkTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
 public class CommandLinkTagTest extends AbstractTagTest{
   private static final String LINK_VALUE = "*! Link Value";
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+      "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
       "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -43,23 +44,23 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "INPUT", 
       new String[]{"type"},
       new String[]{"Submit"},
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContains(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "A", 
       null,
       null,
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContainsNodeWithValue(jspWebBrowser,
-        CommandLinkTagTest.LINK_VALUE, 
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      CommandLinkTagTest.LINK_VALUE, 
+      getTestPageFileName());
     // check tag selection
-    jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("A",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("A",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = jspEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<a4j:commandLink";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
   private static String testText = "test_text";
   private static int numRows = 3;
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -45,27 +46,27 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataDefinitionTagTest.testText, 
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsManyNodes(xhtmlWebBrowser, 
+      getTestPageFileName());
+    assertVisualEditorContainsManyNodes(getVisualEditor(), 
       "DD",
       DataDefinitionTagTest.numRows,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "DL", 
       new String[]{"class"},
       new String[]{"listClass"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "DD", 
       new String[]{"class"},
       new String[]{"columnClass"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DD",2), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DD",2), 0);
       bot.sleep(Timing.time3S());
-      String selectedText = xhtmlEditor.getSelection();
+      String selectedText = getSourceEditor().getSelection();
       String hasToStartWith = "<rich:dataDefinitionList ";
       assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
           "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -26,8 +26,9 @@
   private static final String GRID_COLUMNS = "3";
   private static final String GRID_ELEMENTS = "6";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -54,71 +55,71 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "TABLE", 
       new String[]{"class","columns","elements"},
       new String[]{"dr-table rich-table",DataGridTagTest.GRID_COLUMNS,DataGridTagTest.GRID_ELEMENTS},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "THEAD", 
       null,
       null,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TFOOT", 
       null,
       null,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-header rich-table-header"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-headercell rich-table-headercell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-footer rich-table-footer"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-footercell rich-table-footercell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-row rich-table-row"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-cell rich-table-cell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);    
-    assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
-        "SPAN", 
-        2 + (2 * Integer.parseInt(DataGridTagTest.GRID_ELEMENTS)),
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());    
+    assertVisualEditorContainsManyNodes(getVisualEditor(),
+      "SPAN", 
+      2 + (2 * Integer.parseInt(DataGridTagTest.GRID_ELEMENTS)),
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataGridTagTest.HEADER_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataGridTagTest.FOOTER_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        DataGridTagTest.CELL_0_VALUE,
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        DataGridTagTest.CELL_1_VALUE,
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      DataGridTagTest.CELL_0_VALUE,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      DataGridTagTest.CELL_1_VALUE,
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("THEAD",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("THEAD",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:dataGrid";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
   private static final String ROW_1_VALUE = "!-* Row 1 Value";
   private static final String ROW_2_VALUE = "!-* Row 2 Value";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -47,29 +48,29 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "UL", 
       new String[]{"class"},
       new String[]{"dr-list rich-datalist"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "LI", 
       new String[]{"class"},
       new String[]{"dr-list-item rich-list-item"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataListTagTest.ROW_0_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataListTagTest.ROW_1_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataListTagTest.ROW_2_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selecti
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("LI",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("LI",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:dataList>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
   private static final String ROW_1_VALUE = "!-* Row 1 Value";
   private static final String ROW_2_VALUE = "!-* Row 2 Value";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -47,29 +48,29 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "OL", 
       new String[]{"class"},
       new String[]{"dr-list rich-orderedlist"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "LI", 
       new String[]{"class"},
       new String[]{"dr-list-item rich-list-item"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataOrderedListTagTest.ROW_0_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataOrderedListTagTest.ROW_1_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataOrderedListTagTest.ROW_2_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selecti
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("LI",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("LI",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:dataOrderedList>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
 public class DataScrollerTagTest extends AbstractTagTest{
   private static final String DATA_SCROLLER_STYLE = "background-color: red;";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -41,30 +42,30 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "DIV", 
       new String[]{"class","style"},
       new String[]{"rich-datascr",DataScrollerTagTest.DATA_SCROLLER_STYLE},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"rich-datascr-button rich-datascr-button-dsbld"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"rich-datascr-act"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"rich-datascr-inact"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:datascroller style=\"" + DataScrollerTagTest.DATA_SCROLLER_STYLE + "\"";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -24,8 +24,9 @@
   private static final String COLUMN_0_VALUE = "!-*Column 0 Value";
   private static final String COLUMN_1_VALUE = "!-*Column 1 Value";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -54,57 +55,57 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "TABLE", 
       new String[]{"class"},
       new String[]{"dr-table rich-table"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-header rich-table-header"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-headercell rich-table-headercell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-subheader rich-table-subheader"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-subheadercell rich-table-subheadercell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-firstrow rich-table-firstrow"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-cell rich-table-cell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataTableTagTest.TABLE_HEADER_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataTableTagTest.COLUMN_HEADER_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataTableTagTest.COLUMN_0_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       DataTableTagTest.COLUMN_1_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("THEAD",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("THEAD",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:dataTable>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
  */
 public class EditorTagTest extends AbstractTagTest{
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -40,15 +41,15 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "DIV", 
       new String[]{"class"},
       new String[]{"mceIframeContainer"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:editor ";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -24,8 +24,9 @@
   private static final String COL_0_LABEL = "!-* Col 0 Label";
   private static final String COL_1_LABEL = "!-* Col 1 Label";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -55,52 +56,52 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-subheader rich-table-subheader"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TH", 
       new String[]{"class"},
       new String[]{"dr-table-subheadercell rich-table-subheadercell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-table-subfooter rich-table-subfooter"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-subfootercell rich-table-subfootercell dr-table-subfooter rich-table-subfooter"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TR", 
       new String[]{"class"},
       new String[]{"dr-body-table-tr"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-table-cell rich-table-cell"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ExtendedDataTableTagTest.COL_0_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ExtendedDataTableTagTest.COL_1_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ExtendedDataTableTagTest.COL_0_LABEL,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ExtendedDataTableTagTest.COL_1_LABEL,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selecti
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TABLE",1), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TABLE",1), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:extendedDataTable>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
  */
 public class FileUploadTagTest extends AbstractTagTest{
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+        "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
         "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
         "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
         "<html>\n" +
@@ -41,53 +42,53 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
-        "B", 
-        new String[]{"title"},
-        new String[]{"rich:fileUpload fileUploadListener:  maxFilesQuantity: 1 id: upload immediateUpload: false acceptedTypes: jpg style: width:500; height:500"},
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContains(jspWebBrowser,
-          "DIV", 
-          new String[]{"class"},
-          new String[]{"rich-fileupload-list-decor"},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContains(jspWebBrowser,
-          "DIV", 
-          new String[]{"class"},
-          new String[]{"rich-fileupload-button-border"},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContains(jspWebBrowser,
-          "DIV", 
-          new String[]{"class"},
-          new String[]{"rich-fileupload-button rich-fileupload-font"},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContains(jspWebBrowser,
-          "DIV", 
-          new String[]{"class"},
-          new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-add"},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContains(jspWebBrowser,
-          "DIV", 
-          new String[]{"class"},
-          new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-start"},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContains(jspWebBrowser,
-          "DIV", 
-          new String[]{"class"},
-          new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-clear"},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
+    assertVisualEditorContains(getVisualEditor(),
+      "B", 
+      new String[]{"title"},
+      new String[]{"rich:fileUpload fileUploadListener:  maxFilesQuantity: 1 id: upload immediateUpload: false acceptedTypes: jpg style: width:500; height:500"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV", 
+      new String[]{"class"},
+      new String[]{"rich-fileupload-list-decor"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV", 
+      new String[]{"class"},
+      new String[]{"rich-fileupload-button-border"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV", 
+      new String[]{"class"},
+      new String[]{"rich-fileupload-button rich-fileupload-font"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV", 
+      new String[]{"class"},
+      new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-add"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV", 
+      new String[]{"class"},
+      new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-start"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV", 
+      new String[]{"class"},
+      new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-clear"},
+      getTestPageFileName());
       // check tag selection
-      jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("B",0), 0);
-      bot.sleep(Timing.time3S());
-      String selectedText = jspEditor.getSelection();
-      final String hasToStartWith = "<rich:fileUpload";
-      assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().startsWith(hasToStartWith));
-      final String hasEndWith = "</rich:fileUpload>";
-      assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().endsWith(hasEndWith));
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("B",0), 0);
+    bot.sleep(Timing.time3S());
+    String selectedText = getSourceEditor().getSelection();
+    final String hasToStartWith = "<rich:fileUpload";
+    assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
+    final String hasEndWith = "</rich:fileUpload>";
+    assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().endsWith(hasEndWith));
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/HtmlCommandLinkTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/HtmlCommandLinkTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/HtmlCommandLinkTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
 public class HtmlCommandLinkTagTest extends AbstractTagTest{
   private static final String LINK_VALUE = "*! Html Link Value";
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+      "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
       "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -43,23 +44,23 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "INPUT", 
       new String[]{"type"},
       new String[]{"Submit"},
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContains(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "A", 
       null,
       null,
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContainsNodeWithValue(jspWebBrowser,
-        HtmlCommandLinkTagTest.LINK_VALUE, 
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      HtmlCommandLinkTagTest.LINK_VALUE, 
+      getTestPageFileName());
     // check tag selection
-    jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("A",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("A",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = jspEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<a4j:htmlCommandLink";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/IncludeTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/IncludeTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/IncludeTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,7 +21,7 @@
 public class IncludeTagTest extends AbstractTagTest{
   private static final String INCLUDE_PAGE_NAME = "IncludePage.jsp";
   @Override
-  protected void initPageContent() {
+  protected void initTestPage() {
     // Create pge which will be included
     createJspPage(IncludeTagTest.INCLUDE_PAGE_NAME);
     SWTBotEditorExt includeEditor = botExt.swtBotEditorExtByTitle(IncludeTagTest.INCLUDE_PAGE_NAME);
@@ -30,7 +30,8 @@
       "</a4j:commandButton>\n");
     includeEditor.saveAndClose();
     
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+    initTestPage(TestPageType.JSP,
+      "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
       "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
       "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -47,20 +48,20 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "INPUT", 
       new String[]{"type"},
       new String[]{"Submit"},
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
-    assertVisualEditorContains(jspWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "DIV", 
       new String[] {"vpe:include-element"},
       new String[] {"yes"},
-      AbstractTagTest.TEST_PAGE_NAME_JSP);
+      getTestPageFileName());
     // check tag selection
-    jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("INPUT",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("INPUT",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = jspEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<a4j:include";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
 public class InplaceInputTagTest extends AbstractTagTest{
   private static final String defaultLabel = "DefaultLabel";
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+        "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
         "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
         "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
         "<html>\n" +
@@ -38,39 +39,39 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
-        "SPAN", 
-        new String[]{"vpe-user-toggle-id","title","class"},
-        new String[]{"false","rich:inplaceInput defaultLabel: " + defaultLabel,"rich-inplace rich-inplace-view"},
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContainsNodeWithValue(jspWebBrowser,
-          defaultLabel, 
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      // check tag selection
-      jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("SPAN",2), 0);
-      bot.sleep(Timing.time3S());
-      String selectedText = jspEditor.getSelection();
-      final String expectedSelectedText = "<rich:inplaceInput defaultLabel=\"" + defaultLabel+ "\"/>";
-      assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().equals(expectedSelectedText));
-      jspWebBrowser.mouseClickOnNode(jspWebBrowser.getDomNodeByTagName("SPAN",2));
-      bot.sleep(Timing.time3S());
-      selectedText = jspEditor.getSelection();
-      assertVisualEditorContains(jspWebBrowser,
-          "SPAN", 
-          new String[]{"vpe-user-toggle-id","class"},
-          new String[]{"true","rich-inplace rich-inplace-edit"},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContains(jspWebBrowser,
-          "INPUT", 
-          new String[]{"type","class","value"},
-          new String[]{"text","rich-inplace-field",defaultLabel},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().equals(expectedSelectedText));
-    
+    assertVisualEditorContains(getVisualEditor(),
+      "SPAN", 
+      new String[]{"vpe-user-toggle-id","title","class"},
+      new String[]{"false","rich:inplaceInput defaultLabel: " + defaultLabel,"rich-inplace rich-inplace-view"},
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      defaultLabel, 
+      getTestPageFileName());
+    // check tag selection
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("SPAN",2), 0);
+    bot.sleep(Timing.time3S());
+    String selectedText = getSourceEditor().getSelection();
+    final String expectedSelectedText = "<rich:inplaceInput defaultLabel=\"" + defaultLabel+ "\"/>";
+    assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().equals(expectedSelectedText));
+    getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("SPAN",2));
+    bot.sleep(Timing.time3S());
+    selectedText = getSourceEditor().getSelection();
+    assertVisualEditorContains(getVisualEditor(),
+      "SPAN", 
+      new String[]{"vpe-user-toggle-id","class"},
+      new String[]{"true","rich-inplace rich-inplace-edit"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "INPUT", 
+      new String[]{"type","class","value"},
+      new String[]{"text","rich-inplace-field",defaultLabel},
+      getTestPageFileName());
+    assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().equals(expectedSelectedText));
+  
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
   private static final String option1 = "Option 1";
   private static final String option2 = "Option 2";
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+        "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
         "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
         "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
         "<html>\n" +
@@ -43,51 +44,51 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
-        "SPAN", 
-        new String[]{"vpe-user-toggle-id","title","class"},
-        new String[]{"false","rich:inplaceSelect value: 0 defaultLabel: " + defaultLabel,"rich-inplace-select rich-inplace-select-view"},
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContainsNodeWithValue(jspWebBrowser,
-          defaultLabel, 
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      // check tag selection
-      jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("SPAN",2), 0);
-      bot.sleep(Timing.time3S());
-      String selectedText = jspEditor.getSelection();
-      final String hasToStartWith = "<rich:inplaceSelect value=\"0\" defaultLabel=\"" + defaultLabel + "\">";
-      assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().startsWith(hasToStartWith));
-      final String hasEndWith = "</rich:inplaceSelect>";
-      assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().endsWith(hasEndWith));
-      // Click on tag and check correct tag displaying
-      jspWebBrowser.mouseClickOnNode(jspWebBrowser.getDomNodeByTagName("SPAN",2));
-      bot.sleep(Timing.time3S());
-      assertVisualEditorContains(jspWebBrowser,
-          "SPAN", 
-          new String[]{"vpe-user-toggle-id","class"},
-          new String[]{"true","rich-inplace-select rich-inplace-select-edit"},
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContainsNodeWithValue(jspWebBrowser,
-          option1,
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorContainsNodeWithValue(jspWebBrowser,
-          option2,
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      assertVisualEditorNotContainNodeWithValue(jspWebBrowser, 
-          defaultLabel,
-          AbstractTagTest.TEST_PAGE_NAME_JSP);
-      selectedText = jspEditor.getSelection();
-      // check tag selection
-      assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().startsWith(hasToStartWith));
-      assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().endsWith(hasEndWith));
+    assertVisualEditorContains(getVisualEditor(),
+      "SPAN", 
+      new String[]{"vpe-user-toggle-id","title","class"},
+      new String[]{"false","rich:inplaceSelect value: 0 defaultLabel: " + defaultLabel,"rich-inplace-select rich-inplace-select-view"},
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      defaultLabel, 
+      getTestPageFileName());
+    // check tag selection
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("SPAN",2), 0);
+    bot.sleep(Timing.time3S());
+    String selectedText = getSourceEditor().getSelection();
+    final String hasToStartWith = "<rich:inplaceSelect value=\"0\" defaultLabel=\"" + defaultLabel + "\">";
+    assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
+    final String hasEndWith = "</rich:inplaceSelect>";
+    assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().endsWith(hasEndWith));
+    // Click on tag and check correct tag displaying
+    getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("SPAN",2));
+    bot.sleep(Timing.time3S());
+    assertVisualEditorContains(getVisualEditor(),
+      "SPAN", 
+      new String[]{"vpe-user-toggle-id","class"},
+      new String[]{"true","rich-inplace-select rich-inplace-select-edit"},
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      option1,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      option2,
+      getTestPageFileName());
+    assertVisualEditorNotContainNodeWithValue(getVisualEditor(), 
+      defaultLabel,
+      getTestPageFileName());
+    selectedText = getSourceEditor().getSelection();
+    // check tag selection
+    assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
+    assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().endsWith(hasEndWith));
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
  */
 public class ListShuttleTagTest extends AbstractTagTest{
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -40,70 +41,61 @@
 
   @Override
   protected void verifyTag() {
-      assertVisualEditorContainsNodeWithValue(
-        xhtmlWebBrowser, 
-        "Copy all", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(
-        xhtmlWebBrowser, 
-        "Copy", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(
-        xhtmlWebBrowser, 
-        "Remove All", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(
-        xhtmlWebBrowser, 
-        "Remove", 
-          AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(
-        xhtmlWebBrowser, 
-        "First", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(
-        xhtmlWebBrowser, 
-        "Up", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(
-        xhtmlWebBrowser, 
-        "Last", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(
-        xhtmlWebBrowser, 
-        "Down", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-        "DIV", 
-        new String[]{"class"},
-        new String[]{"rich-shuttle-button-content"},
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-        "TABLE", 
-        new String[]{"class"},
-        new String[]{"rich-list-shuttle"},
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-        "DIV", 
-        new String[]{"class"},
-        new String[]{"rich-shuttle-controls"},
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-        "DIV", 
-        new String[]{"class"},
-        new String[]{"rich-shuttle-control"},
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      // check tag selection
-      xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
-      bot.sleep(Timing.time3S());
-      String selectedText = xhtmlEditor.getSelection();
-      String hasToStartWith = "<rich:listShuttle>";
-      assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().startsWith(hasToStartWith));
-      String hasEndWith = "</rich:listShuttle>";
-      assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().endsWith(hasEndWith));
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Copy all",
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Copy",
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Remove All",
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Remove",
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "First",
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Up",
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Last",
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Down",
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV",
+      new String[] { "class" },
+      new String[] { "rich-shuttle-button-content" }, 
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TABLE",
+      new String[] { "class" }, 
+      new String[] { "rich-list-shuttle" },
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV",
+      new String[] { "class" },
+      new String[] { "rich-shuttle-controls" },
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV",
+      new String[] { "class" }, 
+      new String[] { "rich-shuttle-control" },
+      getTestPageFileName());
+    // check tag selection
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV", 4), 0);
+    bot.sleep(Timing.time3S());
+    String selectedText = getSourceEditor().getSelection();
+    String hasToStartWith = "<rich:listShuttle>";
+    assertTrue("Selected text in Source Pane has to start with '"
+      + hasToStartWith + "'" + "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
+    String hasEndWith = "</rich:listShuttle>";
+    assertTrue("Selected text in Source Pane has to end with '" + hasEndWith
+      + "'" + "\nbut it is '" + selectedText + "'", selectedText.trim().endsWith(hasEndWith));
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -61,8 +61,9 @@
   }
 
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:h=\"http://java.sun.com/jsf/html\"\n" +
@@ -100,85 +101,85 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"rich-pmenu-top-group-self-label"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "TABLE", 
       new String[]{"class"},
       new String[]{"dr-pmenu-top-group rich-pmenu-group"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       PanelMenuTagTest.getGroupLabel(0),
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       PanelMenuTagTest.getGroupLabel(1),
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       PanelMenuTagTest.getGroupLabel(2),
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorNotContainNodeWithValue(xhtmlWebBrowser,
-        PanelMenuTagTest.getGroupItemLabel(0, 0),
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
+    assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
+      PanelMenuTagTest.getGroupItemLabel(0, 0),
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:panelMenu ";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-        "\nbut it is '" + selectedText + "'",
-        selectedText.trim().startsWith(hasToStartWith));
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
     String hasToEndWith = "</rich:panelMenu>";
     assertTrue("Selected text in Source Pane has to end with '" + hasToEndWith + "'" +
-        "\nbut it is '" + selectedText + "'",
-        selectedText.trim().endsWith(hasToEndWith));
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().endsWith(hasToEndWith));
     // select and expand second group
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",6), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",6), 0);
     bot.sleep(Timing.time1S());
-    xhtmlWebBrowser.mouseClickOnNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",6));
+    getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("DIV",6));
     bot.sleep(Timing.time3S());
-    selectedText = xhtmlEditor.getSelection();
+    selectedText = getSourceEditor().getSelection();
     hasToStartWith = "<rich:panelMenuGroup label=\"" + PanelMenuTagTest.getGroupLabel(1);
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-        "\nbut it is '" + selectedText + "'",
-        selectedText.trim().startsWith(hasToStartWith));
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
     hasToEndWith = "</rich:panelMenuGroup>";
     assertTrue("Selected text in Source Pane has to end with '" + hasToEndWith + "'" +
-        "\nbut it is '" + selectedText + "'",
-        selectedText.trim().endsWith(hasToEndWith));
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().endsWith(hasToEndWith));
     // select and expand subgroup
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",8), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",8), 0);
     bot.sleep(Timing.time1S());
-    xhtmlWebBrowser.mouseClickOnNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",8));
+    getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("DIV",8));
     bot.sleep(Timing.time3S());
     // select subgroup item
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",9), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",9), 0);
     bot.sleep(Timing.time3S());
     bot.sleep(Timing.time3S());
-    selectedText = xhtmlEditor.getSelection();
+    selectedText = getSourceEditor().getSelection();
     hasToStartWith = "<rich:panelMenuItem label=\"" + PanelMenuTagTest.getSubGroupItemLabel(1, 0, 0) + "\"";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-        "\nbut it is '" + selectedText + "'",
-        selectedText.trim().startsWith(hasToStartWith));
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
     hasToEndWith = "</rich:panelMenuItem>";
     assertTrue("Selected text in Source Pane has to end with '" + hasToEndWith + "'" +
-        "\nbut it is '" + selectedText + "'",
-        selectedText.trim().endsWith(hasToEndWith));
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        PanelMenuTagTest.getSubGroupItemLabel(1, 0, 0),
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
-        "TD", 
-        new String[]{"class"},
-        new String[]{"rich-pmenu-item-label"},
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().endsWith(hasToEndWith));
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      PanelMenuTagTest.getSubGroupItemLabel(1, 0, 0),
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TD", 
+      new String[]{"class"},
+      new String[]{"rich-pmenu-item-label"},
+      getTestPageFileName());
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
   private static final String HEADER_VALUE = "!-*Header Value";
   private static final String BODY_VALUE = "!-*Body Value";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -46,26 +47,26 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "DIV", 
       new String[]{"class"},
       new String[]{"dr-pnl rich-panel"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "DIV", 
       new String[]{"class"},
       new String[]{"dr-pnl-b rich-panel-body"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       PanelTagTest.HEADER_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       PanelTagTest.BODY_VALUE,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:panel>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,7 +22,7 @@
   private static final String[] options = new String[] {"Option0","Option1","Option2","Option3"};
 
   @Override
-  protected void initPageContent() {
+  protected void initTestPage() {
     StringBuffer sbOptions = new StringBuffer("");
     int index = 0;
     for (String option : options){
@@ -35,7 +35,8 @@
       sbOptions.append("\"/>\n");
       index++;
     }
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -55,95 +56,95 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        "Copy all", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        "Copy", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        "Remove All", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        "Remove", 
-        AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-          "TABLE", 
-          new String[]{"class"},
-          new String[]{"rich-list-picklist"},
-          AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-          "TABLE", 
-          new String[]{"class"},
-          new String[]{"rich-picklist-body"},
-          AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-          "TABLE", 
-          new String[]{"class"},
-          new String[]{"rich-picklist-internal-tab"},
-          AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      assertVisualEditorContains(xhtmlWebBrowser,
-          "TBODY", 
-          null,
-          null,
-          AbstractTagTest.TEST_PAGE_NAME_XHTML);
-      int index = 0;
-      for (String option : options ){
-        assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-            option, 
-            AbstractTagTest.TEST_PAGE_NAME_XHTML);
-        StringBuffer sbTitle = new StringBuffer("");
-        sbTitle.append("f:selectItem itemLabel: ");
-        sbTitle.append(option);
-        sbTitle.append(" itemValue: ");
-        sbTitle.append(index);
-        sbTitle.append(" id: id");
-        sbTitle.append(index);
-        assertVisualEditorContains(xhtmlWebBrowser,
-            "OPTION", 
-            new String[]{"title"},
-            new String[]{sbTitle.toString()},
-            AbstractTagTest.TEST_PAGE_NAME_XHTML);
-        index++;
-      }
-      // check tag selection
-      xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TABLE",1), 0);
-      bot.sleep(Timing.time3S());
-      String selectedText = xhtmlEditor.getSelection();
-      String hasToStartWith = "<rich:pickList value=\"\">";
-      assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().startsWith(hasToStartWith));
-      String hasEndWith = "</rich:pickList>";
-      assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().endsWith(hasEndWith));
-      // select first item in VPE
-      xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("OPTION",0), 0);
-      bot.sleep(Timing.time3S());    
-      String currentLineText = xhtmlEditor.getTextOnCurrentLine();
-      StringBuffer sbOption = new StringBuffer("");
-      sbOption.append("<f:selectItem itemLabel=\"");
-      sbOption.append(options[0]);
-      sbOption.append("\" itemValue=\"0\" id=\"id0\"/>");
-      assertTrue("Current Line text in Source Pane has to be '" + sbOption.toString() + "'" +
-          "\nbut it is '" + currentLineText + "'",
-          currentLineText.trim().equals(sbOption.toString()));
-      // select second item in Source Editor
-      xhtmlEditor.setFocus();
-      xhtmlEditor.selectRange(xhtmlEditor.cursorPosition().line + 1,xhtmlEditor.cursorPosition().column,0);
-      bot.sleep(Timing.time3S());
-      xhtmlWebBrowser.setFocus();
-      bot.sleep(Timing.time3S());
-      StringBuffer sbOptionTitle = new StringBuffer("");
-      sbOptionTitle.append("f:selectItem itemLabel: ");
-      sbOptionTitle.append(options[1]);
-      sbOptionTitle.append(" itemValue: 1 id: id1");
-      assertVisualEditorContains(xhtmlWebBrowser,
-          "OPTION", 
-          new String[]{"title","style"},
-          new String[]{sbOptionTitle.toString(),"border: 2px solid rgb(0, 0, 255) ! important;"},
-          AbstractTagTest.TEST_PAGE_NAME_XHTML);
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Copy all", 
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Copy", 
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Remove All", 
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      "Remove", 
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TABLE", 
+      new String[]{"class"},
+      new String[]{"rich-list-picklist"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TABLE", 
+      new String[]{"class"},
+      new String[]{"rich-picklist-body"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TABLE", 
+      new String[]{"class"},
+      new String[]{"rich-picklist-internal-tab"},
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
+      "TBODY", 
+      null,
+      null,
+      getTestPageFileName());
+    int index = 0;
+    for (String option : options ){
+      assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+        option, 
+        getTestPageFileName());
+      StringBuffer sbTitle = new StringBuffer("");
+      sbTitle.append("f:selectItem itemLabel: ");
+      sbTitle.append(option);
+      sbTitle.append(" itemValue: ");
+      sbTitle.append(index);
+      sbTitle.append(" id: id");
+      sbTitle.append(index);
+      assertVisualEditorContains(getVisualEditor(),
+        "OPTION", 
+        new String[]{"title"},
+        new String[]{sbTitle.toString()},
+        getTestPageFileName());
+      index++;
+    }
+    // check tag selection
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TABLE",1), 0);
+    bot.sleep(Timing.time3S());
+    String selectedText = getSourceEditor().getSelection();
+    String hasToStartWith = "<rich:pickList value=\"\">";
+    assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
+    String hasEndWith = "</rich:pickList>";
+    assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().endsWith(hasEndWith));
+    // select first item in VPE
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("OPTION",0), 0);
+    bot.sleep(Timing.time3S());    
+    String currentLineText = getSourceEditor().getTextOnCurrentLine();
+    StringBuffer sbOption = new StringBuffer("");
+    sbOption.append("<f:selectItem itemLabel=\"");
+    sbOption.append(options[0]);
+    sbOption.append("\" itemValue=\"0\" id=\"id0\"/>");
+    assertTrue("Current Line text in Source Pane has to be '" + sbOption.toString() + "'" +
+      "\nbut it is '" + currentLineText + "'",
+      currentLineText.trim().equals(sbOption.toString()));
+    // select second item in Source Editor
+    getSourceEditor().setFocus();
+    getSourceEditor().selectRange(getSourceEditor().cursorPosition().line + 1,getSourceEditor().cursorPosition().column,0);
+    bot.sleep(Timing.time3S());
+    getVisualEditor().setFocus();
+    bot.sleep(Timing.time3S());
+    StringBuffer sbOptionTitle = new StringBuffer("");
+    sbOptionTitle.append("f:selectItem itemLabel: ");
+    sbOptionTitle.append(options[1]);
+    sbOptionTitle.append(" itemValue: 1 id: id1");
+    assertVisualEditorContains(getVisualEditor(),
+      "OPTION", 
+      new String[]{"title","style"},
+      new String[]{sbOptionTitle.toString(),"border: 2px solid rgb(0, 0, 255) ! important;"},
+      getTestPageFileName());
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
  */
 public class ProgressTagTest extends AbstractTagTest{
   @Override
-  protected void initPageContent() {
-    jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.JSP,
+        "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
         "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
         "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
         "<html>\n" +
@@ -38,23 +39,23 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(jspWebBrowser,
-        "DIV", 
-        new String[]{"title","class"},
-        new String[]{"rich:progressBar mode: client id: progressBar","rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"},
-        AbstractTagTest.TEST_PAGE_NAME_JSP);
-      // check tag selection
-      jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("DIV",4), 0);
-      bot.sleep(Timing.time3S());
-      String selectedText = jspEditor.getSelection();
-      final String hasToStartWith = "<rich:progressBar";
-      assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().startsWith(hasToStartWith));
-      final String hasEndWith = "</rich:progressBar>";
-      assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
-          "\nbut it is '" + selectedText + "'",
-          selectedText.trim().endsWith(hasEndWith));
+    assertVisualEditorContains(getVisualEditor(),
+      "DIV", 
+      new String[]{"title","class"},
+      new String[]{"rich:progressBar mode: client id: progressBar","rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"},
+      getTestPageFileName());
+    // check tag selection
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
+    bot.sleep(Timing.time3S());
+    String selectedText = getSourceEditor().getSelection();
+    final String hasToStartWith = "<rich:progressBar";
+    assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().startsWith(hasToStartWith));
+    final String hasEndWith = "</rich:progressBar>";
+    assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+      "\nbut it is '" + selectedText + "'",
+      selectedText.trim().endsWith(hasEndWith));
   }
 
 }

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
 public class SpacerTagTest extends AbstractTagTest{
   private static final String SPACER_STYLE = "background-color: red;";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -40,15 +41,15 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "IMG", 
       new String[]{"width","height","class","style"},
       new String[]{"1px","1px","rich-spacer",SpacerTagTest.SPACER_STYLE},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("IMG",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("IMG",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:spacer";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java	                        (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -0,0 +1,6 @@
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+public enum TestPageType {
+  XHTML, 
+  JSP;
+}


Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
   private static final String FACET_0_LABEL = "!-* Facet 0 Label";
   private static final String FACET_1_LABEL = "!-* Facet 1 Label";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -49,16 +50,16 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       TogglePanelAndToogleControlTagTest.FACET_0_LABEL,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorNotContainNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
       TogglePanelAndToogleControlTagTest.FACET_1_LABEL,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:togglePanel>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",
@@ -68,9 +69,9 @@
         "\nbut it is '" + selectedText + "'",
       selectedText.trim().endsWith(hasEndWith));
     // check rich:toolBarGroup selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("SPAN",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("SPAN",0), 0);
     bot.sleep(Timing.time3S());
-    selectedText = xhtmlEditor.getSelection();
+    selectedText = getSourceEditor().getSelection();
     hasToStartWith = "<rich:toggleControl>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
   private static final String GROUP_0_LABEL = "!-* Group 0 Label";
   private static final String GROUP_1_LABEL = "!-* Group 1 Label";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
       "  xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -47,21 +48,21 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContains(xhtmlWebBrowser,
+    assertVisualEditorContains(getVisualEditor(),
       "TD", 
       new String[]{"class"},
       new String[]{"dr-toolbar-int rich-toolbar-item"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ToolbarAndToolbarGroupTagTest.GROUP_0_LABEL,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       ToolbarAndToolbarGroupTagTest.GROUP_1_LABEL,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TBODY",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:toolBar>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",
@@ -71,9 +72,9 @@
         "\nbut it is '" + selectedText + "'",
       selectedText.trim().endsWith(hasEndWith));
     // check rich:toolBarGroup selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",1), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TBODY",1), 0);
     bot.sleep(Timing.time3S());
-    selectedText = xhtmlEditor.getSelection();
+    selectedText = getSourceEditor().getSelection();
     hasToStartWith = "<rich:toolBarGroup>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
   private static final String typePathway = "pathway";
   private static final String typeOrganism = "organism";
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -53,24 +54,24 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
-        TreeTagTest.typePathway, 
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+      TreeTagTest.typePathway, 
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       TreeTagTest.typeLibrary, 
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContainsNodeWithValue(getVisualEditor(),
       TreeTagTest.typeOrganism, 
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "IMG", 
       new String[]{"class"},
       new String[]{"treePictureStyle"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToStartWith = "<rich:tree>";
     assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
         "\nbut it is '" + selectedText + "'",

Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java	2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java	2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
  */
 public class VirtualEarthTagTest extends AbstractTagTest{
   @Override
-  protected void initPageContent() {
-    xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+  protected void initTestPage() {
+    initTestPage(TestPageType.XHTML,
+      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
       "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
       "  xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
       "  xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -39,19 +40,19 @@
 
   @Override
   protected void verifyTag() {
-    assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
+    assertVisualEditorContainsManyNodes(getVisualEditor(),
       "IMG", 
       2,
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
-    assertVisualEditorContains(xhtmlWebBrowser,
+      getTestPageFileName());
+    assertVisualEditorContains(getVisualEditor(),
       "SCRIPT", 
       new String[]{"type","src"},
       new String[]{"text/javascript","mozileLoader.js"},
-      AbstractTagTest.TEST_PAGE_NAME_XHTML);
+      getTestPageFileName());
     // check tag selection
-    xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("IMG",0), 0);
+    getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("IMG",0), 0);
     bot.sleep(Timing.time3S());
-    String selectedText = xhtmlEditor.getSelection();
+    String selectedText = getSourceEditor().getSelection();
     String hasToBe = "<rich:virtualEarth/>";
     assertTrue("Selected text in Source Pane has to be '" + hasToBe + "'" +
         "\nbut it is '" + selectedText + "'",



More information about the jbosstools-commits mailing list