package org.openqa.selenium;

import java.util.Arrays;
import java.util.HashMap;
import java.util.logging.ConsoleHandler;
import java.util.logging.Handler;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import java.util.logging.MemoryHandler;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Unit test for simple App.
 */
public class XlatorTest 
    extends TestCase
{
    
    private HashMap<String, String> options;
    private Logger log;
    private String baseUrl = "http://foo.com";
    
    public void setUp() {
        options = new HashMap<String, String>();
        options.put("foo", "bar");
        options.put("packageName", "bar");
        log = Logger.getAnonymousLogger();
        log.setUseParentHandlers(false);
    }
    
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public XlatorTest( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( XlatorTest.class );
    }

    public void testJava() throws Exception
    {
        
        Xlator.xlateTestCase("TestClick", baseUrl, "java-rc", Xlator.loadResource("/tests/TestClick.html"), options, log);
    }
    
    public void testJavaTestNg() throws Exception
    {
        Xlator.xlateTestCase("TestClick", baseUrl, "java-rc-testng", Xlator.loadResource("/tests/TestClick.html"), options, null);
    }
    
    public void testCsharp() throws Exception
    {
        Xlator.xlateTestCase("TestClick", baseUrl, "cs-rc", Xlator.loadResource("/tests/TestClick.html"), options, null);
    }
    
    public void testPerl() throws Exception
    {
        Xlator.xlateTestCase("TestClick", baseUrl, "perl-rc", Xlator.loadResource("/tests/TestClick.html"), options, null);
    }
    
    public void testRuby() throws Exception
    {
        Xlator.xlateTestCase("TestClick", baseUrl, "ruby-rc", Xlator.loadResource("/tests/TestClick.html"), options, null);
    }
    
    public void testPython() throws Exception
    {
        Xlator.xlateTestCase("TestClick", baseUrl, "python-rc", Xlator.loadResource("/tests/TestClick.html"), options, null);
    }
}

@@ -463,24 +463,160 @@
 e%0D%0A%7B%0D%0A    %0D%0A
+    private static final String RESOURCE = %22/tests/TestSelectWindow.html%22;%0D%0A    private static final String NAME = %22TestSelectWindow%22;%0D%0A
     private 
@@ -1423,35 +1423,28 @@
 ateTestCase(
-%22TestClick%22
+NAME
 , baseUrl, %22
@@ -1473,39 +1473,24 @@
 esource(
-%22/tests/TestClick.html%22
+RESOURCE
 ), optio
@@ -1596,35 +1596,28 @@
 ateTestCase(
-%22TestClick%22
+NAME
 , baseUrl, %22
@@ -1653,39 +1653,24 @@
 esource(
-%22/tests/TestClick.html%22
+RESOURCE
 ), optio
@@ -1773,35 +1773,28 @@
 ateTestCase(
-%22TestClick%22
+NAME
 , baseUrl, %22
@@ -1821,39 +1821,24 @@
 esource(
-%22/tests/TestClick.html%22
+RESOURCE
 ), optio
@@ -1939,35 +1939,28 @@
 ateTestCase(
-%22TestClick%22
+NAME
 , baseUrl, %22
@@ -1989,39 +1989,24 @@
 esource(
-%22/tests/TestClick.html%22
+RESOURCE
 ), optio
@@ -2107,35 +2107,28 @@
 ateTestCase(
-%22TestClick%22
+NAME
 , baseUrl, %22
@@ -2157,39 +2157,24 @@
 esource(
-%22/tests/TestClick.html%22
+RESOURCE
 ), optio
@@ -2285,19 +2285,12 @@
 ase(
-%22TestClick%22
+NAME
 , ba
@@ -2333,31 +2333,16 @@
 rce(
-%22/tests/TestClick.html%22
+RESOURCE
 ), o

Use TestSelectWindow instead of TestClick as the sample test, because it does an array comparison